contents.gifindex.gifprev1.gifnext1.gif

8.4.1 Properties of Menu Entries

Menu entries can have these additional properties:

gt490000.gif Any menu entry can be disabled. When disabled, the menu entry appears differently to the user (Under Windows and Windows NT, it's shown in gray text instead of black text. The generic menu handler lets you pick the color or attribute that distinguishes disabled items.) The user is not allowed to select a disabled item.

gt490000.gif Entries on submenus can also be checked. This means that a small mark is shown next to the menu's label. This is usually used to indicate that the corresponding program option is enabled. Under Windows, the mark is a check mark. With the generic menu handler, you can choose the mark; by default it's an asterisk.

gt490000.gif Finally, a submenu entry may have a specialized label that generates a horizontal bar (called a separator). Separators may not be selected by the user, nor may they be checked or disabled. Separators are usually used to group related menu entries.

Your program interacts with the menu subsystem with two techniques.

gt490000.gif You construct menus and control them with the W$MENU library routine.

gt490000.gif You receive input from a menu bar via the ACCEPT statement.

The following sections:

gt490000.gif explain how to create and display a menu using a utility program provided with ACUCOBOL-GT.

gt490000.gif discuss how your program receives input from a menu.

gt490000.gif describe the W$MENU library routine in detail.