Enabling and Disabling Menu Items
To enable or disable individual menu items for a display loop, use the active option:
set_frs menu formname | empty_string
(active(menuitem = 0 | on | 1 | off | :int_var)
where 0 or on enables the specified menu item and 1 or off disables the menu item. You can use a host language integer variable to specify the setting (0 or 1). To refer to the current form you can specify an empty string instead (empty_string must be "" in ESQL, ' ' in EQUEL).
When you disable a menu item, it is removed from the menu line and cannot be selected by the user. The remaining menu items are redisplayed, and function key mappings are adjusted. For example, if the following menu line is displayed:
One(PF1) Two(PF2) Three(PF3) Four(PF4)
and your application disables the menu item Two:
exec frs set_frs menu (active(Two) = off);
the resulting menu line looks like this:
One(PF1) Three(PF2) Four(PF3)
If you disable all menu items, the user must press the Menu key to exit the display loop.
Last modified date: 08/14/2024