Use this field-level keyword to specify the color or display attributes to be used when displaying a selected choice in a menu bar or selection field.
You can use this keyword to specify the color or display attributes to be used for selected choices in a selection field, if the selection field is in a pull-down menu that has PULLDOWN (*NOSLTIND). You can also use the CHCSLT keyword on a subfile control record, when the subfile is used as a single choice or multiple choice selection list. The selected list item is displayed in the color indicated by the keyword on a color display, or displayed with the attribute indicated by the keyword.
CHCSLT([color] [display-attributes])
One parameter must be specified.
The color parameter indicates the color of the choice text specified on the MNUBARCHC or CHOICE keywords for the field on a color workstation. The parameter is specified as an expression of the form (*COLOR value).
The valid values for the color parameter are:
Value | Meaning |
---|---|
BLU | Blue |
GRN | Green |
PNK | Pink |
RED | Red |
TRQ | Turquoise |
YLW | Yellow |
WHT | White |
If the color parameter is not specified, the default color for the selected choice in a menu bar is white. The default color for the selected choices in a selection field in a pull-down menu that does not display selection characters is white. The color parameter is ignored on a monochrome display.
The display-attribute parameter indicates the display attributes of the choice text specified on the MNUBARCHC or CHOICE keywords for the field. The parameter is specified as an expression of the form (*DSPATR value1 <value2 <value3...>>).
The valid values for the display attributes are:
Value | Meaning |
---|---|
BL | Blink |
CS | Column separator |
HI | High intensity |
ND | Nondisplay |
RI | Reverse image |
UL | Underline |
The default display attribute for the selected choice in a menu bar is normal (or low) intensity. The default display attribute for the selected choices in a selection field in a pull-down menu that does not display selection characters is high intensity.
When this keyword is specified for a field, either the MNUBARCHC keyword or the CHOICE keyword must also be specified on the field. If the CHOICE keyword is specified on the field rather than MNUBARCHC, the record containing this field must have the PULLDOWN keyword specified with the value *NOSLTIND. When CHCSLT is specified for a subfile control record, either the SFLSNGCHC or SFLMLTCHC keyword must also be specified on the subfile record.
Option indicators are valid for this keyword.
The following example shows how to specify the CHCSLT keyword:
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A A R RECORD MNUBAR A F1 2Y 0B 1 2 A MNUBARCHC(1 PULLFILE 'File ') A MNUBARCHC(2 PULLEDIT 'Edit ') A CHCSLT((*COLOR PNK) (*DSPATR RI)) A
In this example, when the choice is selected on a color display, the menu bar is displayed in pink reverse image.