Member variable XbpToolBar():transparentColor Foundation
Specifies the transparent color to be used when drawing toolbar button images.
Images defined for the buttons of a XbpToolBar object usually contains areas that should be displayed using the toolbar's background color. If the image of a printer is used as a button image to denote the application's print command, for example, those parts of the image not showing the printer will be displayed using some other color. In order to prevent those areas from standing out from the toolbar's background, the XbpToolBar class supports masking of button images.
The value assigned to the instance variable :transparentColor is a color value specifying the color of the areas within the button images to be replaced with the background color used by the XbpToolBar object. Because tool bar objects use a configurable system color for drawing their background, this prevents the application from having to supply different sets of images depending on the system configuration.
Instances of the XbpToolBar class use the first image that is defined for a tool bar button to determine the transparent color to be used with button images. When the method :addItem() is used to add the first button displaying an image, the image's transparent color is used to initialize the tool bar object's :transparentColor instance variable. If no transparent color is defined for the image, the return value of method XbpBitmap:getDefaultBGColor() is assigned instead. The same procedure is applied when a button object's :image instance variable is used to assign the first image instead of method :addItem().
The color value contained in instance variable :transparentColor is used for all images subsequently loaded. Therefore, if an Xbase++ application uses a set of images for display in an XbpToolBar object, care should be taken that the areas that should be drawn with the toolbar's background are of the same color. If transparency is not desired by the application, the value NIL must be assigned to :transparentColor after the last button image is defined. Likewise, one of the GRA_CLR_xxx constants defined in GRA.CH one of the system colors defined in XBP.CH (XBPSYSCLR_xxx) can assigned to change the transparent color used by a tool bar object at run time. Alternatively, an RGB-encoded value can be used. See function GraMakeRGBColor() for further information on color values.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.