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

TControl.Action

The Action associated with the control.

Declaration

Source position: controls.pp line 1718

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

Description

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

TControl.ActionLink

  

Link to the default Action associated with this control.

TControl.Enabled

  

Determines whether the control responds to mouse or keyboard input.

TControl.Hint

  

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

TControl.Click

  

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

TControl.OnClick

  

Notification handler for mouse clicks.

TControlActionLink

  

Links an Action to a control.

TBasicAction



CT Web help

CodeTyphon Studio