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

TMenuItem.ActionChange

Changes the action for the menu item using the value specified in Sender.

Declaration

Source position: menus.pp line 223

protected procedure TMenuItem.ActionChange(

  Sender: TObject;

  CheckDefaults: Boolean

); virtual;

Arguments

Sender

  

TCustomAction examined and applied to the menu item.

Description

ActionChange- changes the action associated with this menu item to a new action, provided Sender is of type TCustomAction. No actions are performed in the method when Sender is not derived from TCustomAction.

ActionChange updates property values in the current class instance to reflect the values in Sender when CheckDefaults has not been enabled. The following properties are updated from the values in the action:

ActionChange is called when a new value is assigned to the Action property for the menu item or when changes occur in the linked menu action.


Version 3.2 Generated 2024-02-25 Home