FGCOLOR Property
PLBCMP GUI Only
The FGCOLOR property defines the foreground color of an object. The property uses the following format:
FGCOLOR={value|color obj}
Note the following:
FGCOLOR may be used in CREATE, SETPROP, or GETPROP statements.
The {color object} must have been previously created.
The {value} may specify the color as a BGR value or a Windows system color index. The {value} is a four (4) byte integer. When the high order byte contains a value of 0x0, the next three bytes (twenty-four bits) are interpreted as a BGR value. When the high order byte has a value of 0x80, the lower order byte is an index value into the Windows system colors. The Windows system colors are defined by the user using the control panel.
If the FGCOLOR property is changed for a PL/B object that is created as a Windows control, the foreground color change does not take affect if the object is disabled. The Windows grays out the text of a disabled object until the object is enabled by setting the ENABLED property to $ON. The FGCOLOR change takes affect after the object is enabled. This behavior is only expected for Windows controls. This FGCOLOR behavior does not occur for a GROUPBOX, PROGRESS, or STATTEXT because these objects are not created as Windows controls.
Beginning in version 9.6, the FGCOLOR and BGCOLOR are supported for the COMBOBOX styles of 'edit' and 'simple' but not the 'list' style .
See Also: Object Properties, Object IO Instructions, Object Definitions
![]() |