Method XbpWindow():setColorFG() Foundation

Sets or returns the foreground color.

Syntax
:setColorFG( [<nColor>] ) --> nOldColor
Parameters
<nColor>
The #define constants from GRA.CH or XBP.CH must be used for <nColor>. These constants begin with either the prefix GRA_CLR_ or the prefix XBPSYSCLR_. Alternatively, a RGB color value can be used to specify the background color, see function GraMakeRGBColor() for further info.
Return

This method returns the previous color index of the foreground color (current before the method is called). If no new color index is specified, the method simply returns the current color index.

Description

The method :setColorFG() sets the foreground color for an Xbase Part or returns the current color index. The default color is defined by the parent of an Xbase Part.

The foreground color of XbpMenu, XbpMenuBar and XbpPushButton objects cannot be defined by an Xbase++ program. Instead, instances of these Xbase Part classes use system colors defined in Control Panel.

Feedback

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.