CREATE MENU
PLBCMP GUI Only
The CREATE MENU statement initializes a MENU object variable. The statement format is:
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
parent
Optional. A previously created WINDOW or PANEL object variable or pointer to a WINDOW or PANEL object on which the object is created.
menu
Required. The name of a previously defined MENU object variable or pointer to a MENU object.
menu-data
Required. A Character String Variable, a character Literal, a Numeric Variable, an Expression, or a decimal constant defining special menu functions as described below.
aftermenu
Optional. The name of an MENU object variable that is to the left of the menu being created.
value
Optional. The object identification number that is applied to the menu.
Flags Affected: NONE
Note the following:
The resource number of the menu, a character variable or a character literal must be given to describe the MENU object.
If the optional {aftermenu} is not present, the menu is created to the right of the EDIT menu.
If {menu-data} is specified by a character string contained in a character variable or character literal, special characters are allowed that help define the menu.
The first item in the {menu-data} character string is the menu title. Menu items within the {menu-data} are semicolon delimited. Each subsequent item is sequentially assigned an item number starting at one.
{menu-data} items may have special suffixes that result in one of the standard Edit menu functions being activated when the item is selected. The runtime also automatically enables or disables these items based on the current focus and the status of the clipboard.
The special character control characters '(', ')', '/', and '<' can be included as part of a menu item name by repeating the character in the {menu-data} string. See the Menu Special Characters section for more details.
{menu-data} strings may be used in CREATE FLOATMENU, CREATE MENU, CREATE POPUPMENU, or CREATE SUBMENU. For POPUPMENU and SUBMENU, the first item in the character string is not used.
{menu-data} string items may be used in INSERTITEM and SETITEM instructions.
If a menu is created using resource number 1000, or a character string with a menu title of FILE, the default File menu is replaced.
The File, Edit and Help menu items may be replaced using PLBWIN keywords.
If the optional {parent} parameter is not specified, the default window is used.
If the OBJECTID property is specified and no AFTERMENU item is used, an additional comma should precede the property specification.
See Also: Example Code, CREATE, Object Output Instructions
![]() |