SELECTION defines characteristics for all the items in the LAYOUT SCREEN segment.
A text string is specified to be displayed in each ITEM statement in the LAYOUT SCREEN segment. The string is used to describe the menu item to the user. In the SELECTION statement, specify (in the item display argument) if the text for all menu items is displayed all the time or only when the menu item is currently selected.
Each menu item can have an optional keyword (specified in the KEYWORD substatement) that is displayed on the screen. The SELECTION statement specifies two attributes for the keyword when the cursor is positioned on it. The two attributes are the video rendition and the length in which to apply the rendition of the keyword.
Figure 5 shows how the SELECTION statement, the ITEM statement, and the KEYWORD substatement relate to each other.
/SELECTION item_display keyword_length rendition
item_display |
is an integer constant that specifies whether item text is always displayed or is only displayed when the cursor is pointing to the item keyword. |
|
The valid values are:
The text for the item is specified in the ITEM statement. |
keyword_length |
an integer constant that specifies the width of the selection indicator. The selection indicator is a video rendition that is applied to a menu item when the cursor is positioned on it. The width specified by this argument applies to all items specified in KEYWORD statements in the menu layout. The video rendition starts at the first character of the keyword for the length specified by this argument regardless of the length of the keyword defined in the KEYWORD substatement. If zero is specified, the length is the same as the length in the KEYWORD substatement. The keyword text is specified in the KEYWORD statement. |
rendition |
specifies the video attributes for highlighting the keyword area. More than one video attribute may be specified by separating the attributes with plus signs. The valid video attributes are:
|
/SELECTION 2 10 @BLINK+@REVERSE
This statement specifies that the item description should only be displayed when the cursor is pointing to the corresponding keyword. All keywords will be displayed from the first character of the keyword to the next 10 columns regardless of the length of the keyword. The rendition of the keyword where the cursor is positioned is blinking and reverse video.
Figure 5 Keyword and Text for a Menu Item
The keyword is optional, but if specified, it is displayed all the time. The SELECTION statement specifies a video rendition ("selection indicator") for the keyword when the cursor is on it and the length of the keyword to apply the video rendition. The item text is required, but in the SELECTION statement, the item text can be specified to display only when the cursor is on the item.