MSM-Workstation
Macros

Go back to the alphabetic list of macros
Go back to the first page of this tutorial

%%PopMenu ( menu [ , PosX [ , PosY [ , PosU ] ] ] )

This macro generates code that causes a menu-window to pop up.

menu The name of a menu.

PosX A positive numeric value, indicating the left edge of the menu bar.

PosY A positive numeric value, indicating the top edge of the menu bar.

PosU Either absent, or an identification of the type of units to be used for PosX and PosY.

Typically, this macro would be invoked in the context of processing an event that signals that a menu is needed (usually a key-up or a mouse-button-up event).

When the positioning parameters are omitted, the menu bar will appear starting from the position where the mouse was pointing when the menu bar was requested.

Examples

Assume that the code in the following examples occurs in the "action logic" for the event ptrUp

s button=%%EvPtrButton
Catch the relevant parameter of the event

i button="PB1" d xxx q
In case the left-button was pressed and released, do one thing...

i button="PB3" d  q
. %%PopMenu(MenuForDemo)
. q

In case the right-button was pressed and released, pop up the menu for the current object.

See also

%%MarkMenu and %%EnableMenu.