Provides a choice of existing foreground colors. Foreground colors also refer to text.
When setting foreground colors, you have four possibilities:
Use the FOREGROUND-COLOUR-NAME attribute and leave the value at DEFAULT (0). The color will then be determined by your color settings in the operating system.
Use the FOREGROUND-COLOUR-NAME attribute and choose from one of the dialog editor's predefined colors. These are represented by the values 1 to 18.
Define your own color by using the FOREGROUND-COLOUR-VALUE attribute in a dialog editor attributes window. Here, you must first set the FOREGROUND-COLOUR-NAME attribute to CUSTOM (50). A dialog box appears where you can set values for the red, green, and blue elements of your color (RGB model).
Set the color dynamically in the event handler code by assigning a value to the attribute.
Note:
Under Windows, a push button control's foreground color will be
displayed as the system default at runtime, regardless of the
FOREGROUND-COLOUR-NAME value.
Applies to | Canvas control, edit area control, graphic text control, group frame control, input field control, line control, list view control, progress bar control, push button control, radio button control, rectangle control, scrollbar control, selection box control, table control, text constant control, toggle button control, tree view control. |
---|---|
Data Type | I4 |
Default Value | DEFAULT (0) |
DEFAULT (0) | WHITE (1) | BLACK (2) |
LTGRAY (3) | GRAY (4) | DKGRAY (5) |
RED (6) | GREEN (7) | BLUE (8) |
CYAN (9) | MAGENTA (10) | BROWN (11) |
YELLOW (12) | LIGHTRED (13) | LIGHTGREEN (14) |
LIGHTBLUE (15) | LIGHTCYAN (16) | LIGHTMAGENTA (17) |
BRIGHTWHITE (18) | CUSTOM (50) |
Note:
The text representation can be substituted for the integer
representation because the local data area NGULKEY1 (supplied in library
SYSTEM) is automatically included in the event handler code.