DisplayPopupMenu command

The DisplayPopupMenu command displays a popup menu at the specified location.

 

Syntax

Integer=MenuHandle

String$='X, Y, PositioningFlags'

PluginSet("PlugIn","String$")

PluginRun("PlugIn","DisplayPopupMenu")

Parameters

MenuHandle

[in] Handle to the menu to be displayed.

X

[in] Specifies the horizontal location of the popup menu.

Y

[in] Specifies the vertical location of the popup menu.

PositioningFlags

[in] This parameter is optional and can be omitted. Use the following flags to specify how the command positions the popup menu:

 

0

Positions the popup menu so that its left side is aligned with the coordinate specified by the X parameter. This flag is default.

4

Centers the popup menu horizontally relative to the coordinate specified by the X parameter.

8

Positions the popup menu so that its right side is aligned with the coordinate specified by the X parameter.

0

Positions the popup menu so that its top side is aligned with the coordinate specified by the Y parameter. This flag is default.

16

Centers the popup menu vertically relative to the coordinate specified by the Y parameter.

32

Positions the popup menu so that its bottom side is aligned with the coordinate specified by the Y parameter.


Use following flag to alter functionality of the popup menu:


2

User can select menu items with both the left and the right mouse buttons. By default user can select menu items with only the left mouse button.


These flags can be used together (in reasonable combinations) by calculating a sum of the desired flags and using it as the PositioningFlags parameter. For example, to center the popup menu relatively both X and Y coordinates, the following value used:
4 + 16 = 20