StatePictureMaskColor property for PowerScript controls
Controls
ListView, TreeView controls
Description
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.
You can change the mask color before adding each picture. Each image
uses the mask color that was in effect when it was added.
Usage
In a painter
To specify a picture mask color:
-
Select a color from the Picture Mask Color
drop-down list on the State 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 StatePictureMaskColor 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 AddStatePicture calls.
The StatePictureMaskColor 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:
1 |
lv_1.StatePictureMaskColor = RGB(255, 255, 0) |