Use this field-level keyword to specify the color or display attributes to be used when displaying the available choices in a menu bar, push button, selection field, or subfile single or multiple choice selection list.
CHCAVAIL([color] [display-attributes])
One parameter must be specified.
The choice text can also come from the text displayed for a subfile used as a single choice or multiple choice selection list. The parameter is specified as an expression of the form (*COLOR value).
If the color parameter is not specified, the default color for the available choices in a menu bar is green. The default color for the available choices in a selection field is green. This parameter is ignored on a monochrome workstation.
The display-attribute parameter indicates the display attributes of the choice text specified on the MNUBARCHC or CHOICE keyword 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:
The default display attribute in a menu bar is high intensity. The default display attribute in a selection field is normal (or low) intensity.
The CHCAVAIL keyword is allowed on a field only if the field has one or more PSHBTNCHC, CHOICE, or MNUBARCHC keywords. It is also allowed on a subfile control record if the subfile control record uses either the SFLSNGCHC or SFLMLTCHC keywords.
Option indicators are valid for this keyword.
The following example shows how to specify the CHCAVAIL keyword. In the example, the choices in the menu bar, if available, are displayed in yellow on a color display. For a monochrome display, the menu bar is the default color (green) at high intensity.
|....+....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 CHCAVAIL((*COLOR YLW)) A
In the following example, the available choices for the selection field are displayed with underlines.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A A R RECORD A F1 2Y 0B 2 5SNGCHCFLD CHECK(ER) A CHOICE(1 'Choice number 1') A CHOICE(2 'Choice number 2') A CHCCTL(1 &CHCCTL1); A CHCCTL(2 &CHCCTL2); A CHCAVAIL((*DSPATR UL)) A
In the following example, the single choice selection list is displayed in yellow on a color display. The available choices are also underlined.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A R SFLREC SFL A CTLFLD 1Y 0H SFLCHCCTL A R SFLCTLRCD SFLCTL(SFLREC) A SFLSNGCHC A : A : A CHOICE(1 'Choice number 1') A : A : A CHOICE(2 'Choice number 2') A : A : A CHCAVAIL((*DSPATR UL)) A CHCAVAIL((*COLOR YLW))