Sign in Join
FPDoc Onlineexperiment

TControlActionLink class

In unit Controls

Links an Action to a control.

Declaration

pascal
TControlActionLink = class(TActionLink)

Inheritance

  1. TControlActionLink
  2. TActionLink
  3. TBasicActionLink
  4. TObject

Descends from it: TSpeedButtonActionLink TToolButtonActionLink

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):

  • Caption
  • Enabled
  • Hint
  • HelpContext, HelpKeyword, HelpType: these are linked only if all three property values match.
  • Visible
  • OnClick is linked to Action.Execute

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

Methods

AssignClientprotectedCalled during construction, sets FClient to the given control.
SetCaptionprotectedSets the client Caption when it is linked to the Action for the control.
SetEnabledprotectedSets the client Enabled property when it is linked to the action.
SetHintprotectedSets client Hint when it is linked to the action.
SetHelpContextprotectedSets the HelpContext, if the old Help properties match (IsHelpLinked).
SetHelpKeywordprotectedSets the HelpKeyword, if the old Help properties match (IsHelpLinked).
SetHelpTypeprotectedSets the HelpType, if the old Help properties match (IsHelpLinked).
SetVisibleprotectedSets the Visible property in the client, if the old values match.
SetOnExecuteprotectedSet OnClick handler for the client, if the old values match.
IsOnExecuteLinkedprotectedTrue if the OnClick handler in the client is the same routine assigned to the OnExecute handler in the action.
DoShowHintprotectedFormats the hint string for the client control when it includes a ShortCut or accelerator key.
IsCaptionLinkedpublicIs the action's Caption linked to the client?
IsEnabledLinkedpublicIs the action's Enabled property linked to the client?
IsHelpLinkedpublicHelp properties are assumed linked only when all these properties match.
IsHintLinkedpublicIs the action's Hint property linked to the client?
IsVisibleLinkedpublicIs the action's Visible property linked to the client?

Fields

FClientprotectedThe client control that is linked to the action.

Inherited

From TActionLink (11)

IsCheckedLinked IsGroupIndexLinked IsHelpContextLinked IsImageIndexLinked IsShortCutLinked SetAutoCheck SetChecked SetGroupIndex SetImageIndex SetShortCut Update

From TBasicActionLink (7)

Action Change Create Destroy Execute OnChange SetAction

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.