PopUpMenuSelect
To pop up a menu and initiate user selection of a menu item, use the PopUpMenuSelect function.
FUNCTION PopUpMenuSelect(theMenu as MenuHandle, top as Integer, left as Integer, popUpItem as Integer) as Integer
theMenu Handle of a menu.
top Vertical position (global screen coordinates)
left Horizontal position (global screen coordinates)
popUpItem ID of item to align with top.
returns: a 32-bit integer that indicates the selected menu and item. Use HiWord to extract the Menu ID (0 for none). And LoWord to extract item number of selection. (HiWord and LoWord are in UtilsLib)
Description:
PopUpMenuSelect displays a popup menu at the specified coordinates and interacts with the user until the mouse button is released.
Most often, popup menus are inserted into the menu directly before calling PopUpMenuSelect and deleted immediately afterwards.
Example:
InsertMenu myMenu,-1
result = PopUpMenuSelect(myMenu,y,x,1)
DeleteMenu myMenu.menuID
Supported platforms:
* MacOS PPC
* MacOS Carbon
* MacOS 68k
Unsupported platforms:
* Windows x86