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

TCustomSpeedButton.ActionChange

Performs action when a new value is assigned to the Action property for the control.

Declaration

Source position: buttons.pp line 396

protected procedure TCustomSpeedButton.ActionChange(

  Sender: TObject;

  CheckDefaults: Boolean

); override;

Arguments

Sender

  

New action instance for the event.

CheckDefaults

  

True to use existing properties as default values, False to use properties from the new action.

Description

ActionChange is overridden in TCustomSpeedButton to ensure that values from the new action instance in Sender are stored to properties in the control. ActionChange is the routine which implements the OnChange event handler for the ActionLink in the control. It is signalled (from TControl) when a new value is assigned to the Action property, or when the control is loaded using LCL component streaming.

Sender is the new action instance for the event, or Nil when the value in Action has been removed (set to Nil).

CheckDefaults indicates whether existing properties values in the control are used as default values. When set to False, the values from the action instance are applied to the control. Values from the action may be used (when assigned) if the properties in the control are unassigned - even when CheckDefaults is True.

ActionChange calls the inherited method to update property values like Caption, Enabled, Hint, Visible, HelpContext and HelpKeyword. When Sender is a TCustomAction instance, the values in GroupIndex, ImageIndex, and Images are also updated with the values from the action.

See also

TControl.ActionChange

  

Handler for a changed Action.


Version 3.2 Generated 2024-02-25 Home