Applies to

Picture, PictureHyperlink, and PictureButton controls


Maps the silver and other gray colors in the bitmap associated with the control to the button highlight, button face, or button shadow colors set in the Windows control panel. When this property is false (the default), the control uses the standard PowerBuilder button colors defined in the bitmap.

Use this feature if you want to place a control containing a picture on a window and have the picture blend in with the background color of the window when the window's background is using Button Face for a 3D effect. The control's picture then takes on the 3D colors the user has selected on the Appearance page of the Display Properties dialog box in the Windows control panel.

The window's background must be set to Button Face. To make the image blend in with the window, give it a background color in the range between RGB(160,160,160) and RGB(223,223,223), such as silver. Lighter shades of gray map to the button highlight color and darker shades to the button shadow color.

This option can affect other colors used in the bitmap. It does not affect the control's border settings, and it has no effect if there is no image associated with the control.


In a painter

To set 3DColor mapping:

  • Select the 3D Color check box on the General page of the control's Properties view.

In scripts

The Map3DColors property takes a boolean value. The following example sets 3D color mapping for a PictureButton:

pb_1.Map3DColors = TRUE