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

TMenuItem.OnClick

Event handler signalled to perform the actions needed when the menu item is executed.

Declaration

Source position: menus.pp line 351

published property TMenuItem.OnClick : TNotifyEvent
  read FOnClick
  write FOnClick;

Description

OnClick is a TNotifyEvent property with the event handler signalled when the menu item is executed. OnClick is signalled from the Click method (when assigned) if the menu item is Enabled. OnClick is not signalled (even when assigned) if the menu item has an Action with an OnExecute event handler; the action is used instead.

OnClick (or OnExecute in an action) occurs after values in AutoCheck and Checked has been examined and optionally updated in the Click method.

See also

TMenuItem.Click

  

Performs actions needed when the menu item is clicked.

TMenuItem.Enabled

  

Indicates if the menu item can be selected and executed.

TMenuItem.Visible

  

Indicates whether the menu item is visible (True) or hidden (False).

TMenuItem.Action

  

Action is the default action associated with the menu item.

TMenuItem.ActionLink

  

Contains the link to the Action for the menu item.

TMenuActionLink

  

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

TBasicAction


Version 4.0 Generated 2025-05-03 Home