Unit 'Controls' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]


The Action associated with the control.


Source position: controls.pp line 1718

public property TControl.Action : TBasicAction
  read GetAction
  write SetAction;


Action is a TBasicAction property with the action assigned to the control. The value for the property is read from the Action property in ActionLink (when assigned). If ActionLink has not been assigned, the property value is Nil.

Assigning an action to the property causes ActionLink to be updated. If the new property value is Nil, the TControlActionLink instance in ActionLink is freed and control style flags are updated to remove the value csActionClient.

Conversely, a TControlActionLink instance is created for a non-empty action assignment. Its OnChange event handler is set to the private DoActionChange method in the class instance. Control style flags are updated to include the value csActionClient.

Action is used in the Click method to signal its OnExecute event handler when assigned and enabled. Preference is given to the OnClick in the control (when assigned).

Values in the Caption, Enabled, HelpType, and Hint properties can be linked to the Action through the property values in the ActionLink.

Use AssignTo to copy property values in the control to a TCustomAction instance.

See also



Link to the default Action associated with this control.



Determines whether the control responds to mouse or keyboard input.



The text to show in the Hint window for the control.



Signals OnClick and/or executes the ActionLink when the control has been clicked.



Notification handler for mouse clicks.



Links an Action to a control.


CT Web help

CodeTyphon Studio