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

TPopupMenu

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TPopupMenu - a menu panel that pops up on the desktop when the right mouse button is clicked

Declaration

Source position: menus.pp line 353

type TPopupMenu = class(TMenu)

protected

  procedure DoPopup(); virtual;

  

  procedure DoClose; virtual;

  

public

  constructor Create(); override;

  

  destructor Destroy; override;

  

  procedure PopUp();

  

  property PopupComponent: TComponent; [rw]

  

  property PopupPoint: TPoint; [r]

  

  procedure Close;

  

published

  property AutoPopup: Boolean; [rw]

  

  property OnPopup: TNotifyEvent; [rw]

  

  property OnClose: TNotifyEvent; [rw]

  

end;

Inheritance

TPopupMenu

  

TPopupMenu - a menu panel that pops up on the desktop when the right mouse button is clicked

|

TMenu

  

TMenu : The base class for all menus

|

TLCLComponent

  

TLCLComponent - base class for LCL components

|

TComponent

|

TObject

Description

TPopupMenu : a menu panel that pops up on the desktop when the right mouse button is clicked.

Inherits all the properties of TMenu (including the properties of TMenuItem), but has some new properties (procedure PopUp and procedure Close) that define its behaviour when actually invoked.

PopupPoint defines the position of the Popup menu, usually at the current cursor position.

To use a Popup menu, first create it with the MenuEditor. Then with the Object Inspector for the control that needs to use the Popup, select the property named PopupMenu, and a listbox will appear with the names of the available Menus - choose the Popup name you want

See also

HowToUseMenus

  

HowToUseMenus - hints for creating Menus for your Forms

TMainMenu

  

TMainMenu - the Main Menu that appears at the top of most windows

TMenuItem

  

TMenuItem - The base structure of each item in a Menu.

TMenu

  

TMenu : The base class for all menus

TMenuActionLink

  

TMenuActionLink: defines the link between a selected menu item and its corresponding action

The latest version of this document can be found at lazarus-ccr.sourceforge.net.