Vcl.Menus.TMenuItem.OnClick
Delphi
property OnClick: TNotifyEvent read FOnClick write FOnClick stored IsOnClickStored;
C++
__property System::Classes::TNotifyEvent OnClick = {read=FOnClick, write=FOnClick, stored=IsOnClickStored};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | published | Vcl.Menus.pas Vcl.Menus.hpp |
Vcl.Menus | TMenuItem |
Description
Occurs when the user clicks menu item.
Write an OnClick event handler to implement the desired behavior for when the user selects the menu item. An advantage of using the OnClick event handler over directly handling WM_COMMAND messages sent when the user selects the menu item, is that only the OnClick event occurs when the Click method is called.
Note: This event handler is not stored with the menu item if it is supplied by a TAction object.
See Also
Code Examples
- ArrangeIcons (Delphi)
- PopupMenu (Delphi)
- TMenuItems (Delphi)
- ArrangeIcons (C++)
- PopupMenu (C++)
- TMenuItems (C++)