CHCAVAIL (Choice Color/Display Attribute when Available) keyword for display files

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.

The format of the keyword is:
CHCAVAIL([color] [display-attributes])

One parameter must be specified.

The color parameter indicates the color of the choice text for a field on a color workstation. The choice text can be specified on the following keywords:
  • MNUBARCHC
  • CHOICE
  • PSHBTNCHC

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).

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 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:

Value
Meaning
BL
Blink
CS
Column separator
HI
High intensity
ND
Nondisplay
RI
Reverse image
UL
Underline

The default display attribute in a menu bar is high intensity. The default display attribute in a selection field is normal (or low) intensity.

Note: Display attributes CS, HI, and BL can cause fields on 5292, 3179, 3197 Models C1 and C2, 3477 Model FC, 3486, 3487 Model HC, and 34881 workstations to appear as color fields. Separator lines do not appear when display attributes HI, RI, and UL are used.

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.

Example 1

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

Example 2

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

Example 3

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))
Related reference
SFLMLTCHC (Subfile Multiple Choice Selection List) keyword for display files
COLOR (Color) keyword for display files
1 Dependent on the monitor attached to the display device.