MenuItem.Popup Function

Displays the MenuItem as a contextual menu. If no parameters are passed, the contextual menu appears at the location of the mouse pointer.

Syntax
result = MenuItem.Popup( [x], [y] )

Parameters
x | Integer (Optional)
y | Integer (Optional)

Return Value
Result | MenuItem

# Notes

If you pass the optional parameters, the contextual menu appears at the passed location. The coordinates are global, not just in the object that handles the MouseDown event.

Popup returns the selected item as a MenuItem. The selected item's Action event will be fired. If the selected item is handled by a MenuHandler that returns True, then PopUp will return Nil.