MENU ADD POPUP statement

Purpose | Add a popup child menu to an existing menu.
Syntax | MENU ADD POPUP, hMenu, txt$, hPopup [AS id], state& [, AT [BYCMD] position&]
Remarks | A popup menu is a small window that "pops up" when a menu item is highlighted. This allows nesting, and gives the user an opportunity to choose from "sub-menu" items.
hMenu | Handle of the parent menu which holds the popup.
txt$ | Text displayed in the parent menu. An ampersand (&) may be used in the string to make the following letter into a control accelerator (hot-key). The letter appears underscored to signify that it is an accelerator.
hPopup | Handle of the child popup menu to be added.
id | If the option AS ID is included, id is a unique numeric identifier for this popup menu. id may be used later with a BYCMD option to reference this popup. id is an integral numeric value in the range of -32768 to +32767.

state&

The initial state of the menu item. It can be one of the following:

%MFS_DISABLED | Disable the item so that it cannot be selected.
%MFS_ENABLED | Enable the item so that it can be selected.

position& | Indicates the position in the parent menu where the popup child menu is to be inserted. If the BYCMD option is used, the popup menu is inserted prior to the menu item ID specified by position&. Otherwise, the popup menu is inserted at the physical position& within the parent menu, where position& = 1 for the first position, position& = 2 for the second, and so on. If position is not specified then the popup menu is appended to the end of the menu.
See also | Dynamic Dialog Tools, ACCEL ATTACH, Menus, MENU ADD STRING, MENU ATTACH, MENU CONTEXT, MENU DELETE, MENU DRAW BAR, MENU GET STATE, MENU GET TEXT, MENU NEW BAR, MENU NEW POPUP, MENU SET STATE, MENU SET TEXT
Example | See Menu Example.