PictureMaskColor

Applies to

PictureListBox, DropDownPictureListBox, TreeView controls, TabPage user objects

Description

The PictureMaskColor property specifies the color in the picture that is transparent when the picture is displayed. 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 add your own colors to the color drop-down list, select Design>Custom Colors before displaying the Properties view.

To set the picture mask color for ListBox and TreeView controls:

  1. Select the Pictures tab page of the control's Properties view.

  2. Select the desired color from the Picture Mask Color drop-down list box.

To set the picture mask color for TabPage objects in a tab control:

  1. Select the desired TabPage object of the tab control.

  2. Select the Picture tab page of the TabPage object's Properties view.

  3. Select the desired color from the Picture Mask Color drop-down list box.

To set the picture mask color for a TabPage user object:

  1. Select the TabPage tab page of the user object's Properties view.

  2. Select the desired color from the Picture Mask Color drop-down list box.

    The mask color selected for the user object can be changed after it has been inserted into a tab control.

In scripts

The PictureMaskColor property takes a long value (-2 to 16,777,215) that specifies the numerical value of the mask color. The PictureMaskColor 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. In scripts, this property is used when each picture is added and, therefore, can be changed between AddPicture calls.

The following example sets yellow as the mask color for pictures in a DropDownPictureListBox:

ddplb_1.PictureMaskColor = RGB(255, 255, 0)