Applies to

ListView controls


The mask color is the color in the picture that is transparent when the picture is displayed.

Select the color to mask newly added user-defined bitmaps. In scripts, you can change the mask color before adding each picture. Each image uses the mask color that was in effect when it was added.


In a painter

To specify a picture mask color:

  • Select a color from the Picture Mask Color drop-down list on the Small Picture tab page of the control's Properties view.

    To add your own colors to the color drop-down list, select Design>Custom Colors before displaying the Properties view.

In scripts

The SmallPictureMaskColor property takes a long (-2 to 16,777,215) that specifies the numerical value of the background color. This property is used when each bitmap is added and, therefore, can be changed between AddSmallPicture calls.

The SmallPictureMaskColor value is a combination of values for the red, green, and blue components of the color. If you do not know the long value for a particular color, choose Design>Custom Colors to determine the red, green, and blue values and then call the RGB function to specify the color in a script.

The following example sets yellow as the mask color for user-defined bitmaps in a ListView:

lv_1.SmallPictureMaskColor = RGB(255, 255, 0)