Use this field-level keyword to define a field as a push button field.
A push button field is a field that contains a fixed number of push buttons from which a user can select. The field appears as a list of command keys each enclosed with '<>' or as a group of push buttons.
PSHBTNFLD[([*NORSTCSR ∨ *RSTCSR] [(*NUMCOL nbr-of-cols) ∨ (*NUMROW nbr-of-rows)] [(*GUTTER gutter-width)])]
The parameters are optional and can be entered in any order. When no parameter is specified, the push button field choices are arranged horizontally. *GUTTER parameter is set to 3 as default and the field will be displayed using as many lines as it takes to display all of the choices. There will be 3 spaces between each choice.
The RSTCSR parameter specifies whether the arrow keys should be allowed to move the selection cursor outside of the field. *RSTCSR specifies that the arrow keys will not cause the selection cursor to move outside of the push-button field. *NORSTCSR specifies that the arrow keys will cause the selection cursor to leave the field. The default is *NORSTCSR.
< F1 > < F2 > < F3 > < F4 > < F5 > < F6 > < F7 > < F8 > < F9 >
Nbr-of-rows specifies how many rows the push-button field should contain. Nbr-of-rows must be a positive integer and the entire single-choice push-button field must be able to fit on the display when placed in the specified number of rows.
The *GUTTER parameter specifies the number of blanks to be placed between each column of the push-button field. Unlike the SNGCHCFLD keyword, it can be specified even if *NUMCOL or *NUMROW have not been specified. The gutter-width must be a positive integer. If *GUTTER is not specified, the default of gutter-width is set to three blanks. The gutter value must be a number greater than one.
For more information about how to support different device configurations, see the Application Display Programming book.
A field containing the PSHBTNFLD keyword must also contain one or more PSHBTNCHC keywords defining the choices for the field.
The field containing the PSHBTNFLD keyword must be defined as an input-capable field with data type Y, length equal to 2, and decimal positions of 0. The position specified for the field is the position of the first push-button choice. For input, the field contains the number of the choice selected, or 0 if no choice was selected. For output, the value of the field is ignored.
The following keywords can be specified on a field with the PSHBTNFLD keyword:
ALIAS |
INDTXT |
Option indicators are not valid for this keyword.
The following example shows how to specify the PSHBTNFLD keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A A R RECORD A : A : A 2 40'MENU' A F1 2Y 0B 24 02PSHBTNFLD A PSHBTNCHC(1 'Cmd1' CF01) A PSHBTNCHC(2 'Enter') A 01 A
In this example, when using a graphical display station attached to a controller that supports an enhanced interface for non-programmable workstations, the push-button fields look like this: