CREATE POPUPMENU


PLBCMP GUI Only

square.png Properties

square.png Events

square.png Instructions

 

The CREATE POPUPMENU statement initializes a POPUPMENU object variable. The statement format is:

 

 

[label]

CREATE

[{parent};]{popupmenu}={pos}:

 

 

 

{name},{menu-data}[,{property list}...]

 

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.

popupmenu

Required. The name of a previously defined POPUPMENU object variable or pointer to a POPUPMENU object.

pos

Required. The screen position of the object given as: {top}:{bottom}:{left}:{right}.

name

Required. A Character String Variable or character Literal providing a name for the menu.

menu-data

Required. A Character String Variable, a character Literal, a Numeric Variable, an Expression, or a decimal constant allowing special menu functions as described below.

property list

Optional. One or more of the object properties.

Flags Affected: NONE

Note the following:

  1. The {pos} screen coordinates for the object must be given and must be valid. Each of the coordinates may be a numeric variable, an Expression, or a decimal constant.

  2. The {name} operand provides a title for the menu.

  3. 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.

  4. {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.

  5. The first item in the {menu-data} character string is not used for the POPUPMENU. Menu items within the {menu-data} are semicolon delimited.

  6. To allow dynamic use of fonts without changing object coordinates, the top and bottom size for the window are determined by the initial number of items in {menu-data}. If the program adds more items to the POPUPMENU using the INSERTITEM instruction, the initial size does not change. However, scroll bars become visible to access other items for the POPUPMENU.

  7. If the optional {parent} parameter is not specified, the default window is used.

 

 

See Also: Example Code, CREATE, Object Output Instructions

 



PL/B Language Reference CREATE PICT CREATE PROGRESS