[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Menus' (#lcl)

TPopupMenu.PopUp

Displays the pop-up menu.

Declaration

Source position: menus.pp line 470

public procedure TPopupMenu.PopUp;

procedure TPopupMenu.PopUp(

  X: Integer;

  Y: Integer

); virtual;

Arguments

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 parameterless version 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 value has already been assigned to the ActivePopupMenu variable. 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.

See also

TPopUpMenu.DoPopUp

  

Performs actions needed to display the pop-up menu.

TPopUpMenu.OnPopup

  

Event handler signalled to display the pop-up menu.

TMenu.Items

  

Contains the menu items displayed on the menu.

TMenuItem.InitiateActions

  

Updates Actions in child menu items.

TMenuItem.ActionLink

  

Contains the link to the Action for the menu item.

OnMenuPopupHandler

  

Unit global variable with the event handler signalled when a pop-up menu is displayed.


Version 3.2 Generated 2024-02-25 Home