TPopupMenu.PopUp procedure
Displays the pop-up menu.
Declaration
procedure PopUp
procedure PopUp(X: Integer; Y: Integer); virtualArguments
X | Horizontal coordinate where the pop-up menu is displayed. |
Y | Vertical coordinate where the pop-up menu is displayed. |
Description
PopUp is an overloaded method used to display the pop-up menu. An
overloaded variant is provided which includes
X and
Y
coordinates where the pop-up menu is displayed. The parameter-less variant
calls the overloaded variant using the current position for the mouse pointer
in the X and Y arguments.
No actions are performed in the method if a pop-up menu has already been
assigned to the ActivePopupMenu variable.
PopUp updates the PopupPoint property with the coordinates specified
in X and Y and releases the current mouse capture in the widgetset.
DoPopUp is called to signal the OnPopup event handler
(when assigned).
No additional actions are performed in the method if menu items have not been
defined in the Items property.
PopUp sets the value in ActivePopupMenu to the current class
instance. The InitiateActions method is called for the menu
Items to ensure that the ActionLink for the component is
updated. The handles for the menu and its sub-items are recreated, and the
OnMenuPopupHandler event handler is signalled (when assigned).
PopUpMenu calls the corresponding method in the widgetset class prior to exiting from the method.
Modified in LCL version 4.0 to use the protected SetPopupPoint method to update the location for the pop-up menu.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
