Method XbpActiveXControl():setColorFG() Foundation

Set 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 foreground color (current before the method is called). If no new color is specified, the method simply returns the current color.

Description

The method :setColorFG() sets the foreground color or returns the current foreground color set for an ActiveX Control. The default color is specified by the control's parent object.

Using :setColorFG() to set a new foreground color for an ActiveX control implicitly overrides the corresponding setting of the control container's ambient property (DISPID_AMBIENT_FORECOLOR). See :inheritPresParams()for further information.

Not all ActiveX controls support changing the foreground color via the DISPID_FORECOLOR property. Check the documentation that accompanies your ActiveX control to find out whether it supports the DISPID_FORECOLOR property.

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.