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

TControlActionLink

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Links an Action to a control.

Declaration

Source position: controls.pp line 901

type TControlActionLink = class(TActionLink)

protected

  FClient: TControl;

  

The client control that is linked to the action.

  procedure AssignClient(); override;

  

Called during construction, sets FClient to the given control.

  procedure SetCaption(); override;

  

Sets the client's Caption, if the old values match.

  procedure SetEnabled(); override;

  

Sets the client's Enabled property, if the old values match.

  procedure SetHint(); override;

  

Sets client's Hint, if the old values match.

  procedure SetHelpContext(); override;

  

Sets the HelpContext, if the old Help properties match (IsHelpLinked).

  procedure SetHelpKeyword(); override;

  

Sets the HelpKeyword, if the old Help properties match (IsHelpLinked).

  procedure SetHelpType(); override;

  

Sets the HelpType, if the old Help properties match (IsHelpLinked).

  procedure SetVisible(); override;

  

Sets the Visible property in the client, if the old values match.

  procedure SetOnExecute(); override;

  

Set OnClick handler for the client, if the old values match.

  function IsOnExecuteLinked; override;

  

True if the client's OnClick is the action's OnExecute handler.

  function DoShowHint(); virtual;

  

Compose the hint string, depending on HintShortCuts.

public

  function IsCaptionLinked; override;

  

Is the action's Caption linked to the client?

  function IsEnabledLinked; override;

  

Is the action's Enabled property linked to the client?

  function IsHelpLinked; override;

  

Help properties are assumed linked only when all these properties match.

  function IsHintLinked; override;

  

Is the action's Hint property linked to the client?

  function IsVisibleLinked; override;

  

Is the action's Visible property linked to the client?

end;

Inheritance

TControlActionLink

  

Links an Action to a control.

|

TActionLink

  

A link between an action and a client class.

|

TObject

Description

An ActionLink is created when an Action is assigned to the control. TControl.Action effectively becomes TControl.ActionLink.Action.

An ActionLink propagates changes in Action properties to the client control. It's assumed that properties of the same value (in the Control and Action) are linked to the Action, and follow changes to the Action properties.

Linked control properties are (by default):

The control can update itself, when it receives a Change notification from the ActionLink TControl.ActionChange.