[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Performs actions needed when the menu item is clicked.
Source position: menus.pp line 282
public procedure TMenuItem.Click; virtual; |
Click is method used to perform actions needed when the menu item is clicked, or when the DoClick method is called. No actions are performed in the method if the menu item is not Enabled.
Click signals the OnMenuPopupHandler event handler variable (when assigned).
Properties in the TMenuItem instance are examined to determine whether an Action is used to execute the menu item, or if its OnClick event handler is signalled for the purpose. An action is used when the ActionLink property has been assigned for the class instance. The action is not executed if the menu item is clicked at design-time.
Otherwise, the OnClick event handler is used. When AutoCheck is enabled, the value for the Checked property is toggled when the menu item. If the menu item has been configured as a RadioItem, Checked cannot be set to False; that is handled using the logic for the radio button group.
The OnClick event handler is signalled to perform the actions for the menu item.
AutoCheck does not cause the item to become checked at design-time.
|
Indicates whether the menu item automatically toggles the value in Checked when executed. |
|
|
Indicates whether a check mark is displayed beside the menu item. |
|
|
Event handler signalled to perform the actions needed when the menu item is executed. |
|
|
Unit global variable with the event handler signalled when a pop-up menu is displayed. |
Version 4.0 | Generated 2025-05-03 | Home |