POPUP text, [optionlist]
BEGIN
item-definitions
.
.
.
END
The POPUP statement marks the beginning of the definition of a pop-up menu. A pop-up menu (which is also known as a drop-down menu) is a special menu item that displays a sublist of menu items when it is selected.
text
Specifies the name of the pop-up menu. This string must be enclosed in double quotation marks.
optionlist
Specifies one or more predefined menu options that specify the appearance of the menu item. The menu options follow:
Option | Description |
CHECKED | Item has a check mark next to it. This option is not valid for a top-level pop-up menu. |
GRAYED | Item name is initially inactive and appears on the menu in gray or a lightened shade of the menu-text color. |
INACTIVE | Item name is displayed but it cannot be selected. |
MENUBARBREAK | Same as MF_MENUBREAK except that for pop-up menus, it separates the new column from the old column with a vertical line. |
MENUBREAK | Places the menu item on a new line for static menu-bar items. For pop-up menus, it places the menu item in a new column with no dividing line between the columns. |
The options can be combined using the bitwise OR operator. The INACTIVE and GRAYED options cannot be used together.
The following example demonstrates the usage of the POPUP statement:
chem MENU
BEGIN
POPUP "&Elements"
BEGIN
MENUITEM "&Oxygen", 200
MENUITEM "&Carbon", 201, CHECKED
MENUITEM "&Hydrogen", 202
MENUITEM "&Sulfur", 203
MENUITEM "Ch&lorine", 204
END
POPUP "&Compounds"
BEGIN
POPUP "&Sugars"
BEGIN
MENUITEM "&Glucose", 301
MENUITEM "&Sucrose", 302, CHECKED
MENUITEM "&Lactose", 303, MENUBREAK
MENUITEM "&Fructose", 304
END
POPUP "&Acids"
BEGIN
"&Hydrochloric", 401
"&Sulfuric", 402
END
END
END