TControlActionLink class
Links an Action to a control.
Declaration
TControlActionLink = class(TActionLink)Inheritance
- TControlActionLink
- TActionLink
- TBasicActionLink
- 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
AssignClient | protected | Called during construction, sets FClient to the given control. |
SetCaption | protected | Sets the client Caption when it is linked to the Action for the control. |
SetEnabled | protected | Sets the client Enabled property when it is linked to the action. |
SetHint | protected | Sets client Hint when it is linked to the action. |
SetHelpContext | protected | Sets the HelpContext, if the old Help properties match (IsHelpLinked). |
SetHelpKeyword | protected | Sets the HelpKeyword, if the old Help properties match (IsHelpLinked). |
SetHelpType | protected | Sets the HelpType, if the old Help properties match (IsHelpLinked). |
SetVisible | protected | Sets the Visible property in the client, if the old values match. |
SetOnExecute | protected | Set OnClick handler for the client, if the old values match. |
IsOnExecuteLinked | protected | True if the OnClick handler in the client is the same routine assigned to the OnExecute handler in the action. |
DoShowHint | protected | Formats the hint string for the client control when it includes a ShortCut or accelerator key. |
IsCaptionLinked | public | Is the action's Caption linked to the client? |
IsEnabledLinked | public | Is the action's Enabled property linked to the client? |
IsHelpLinked | public | Help properties are assumed linked only when all these properties match. |
IsHintLinked | public | Is the action's Hint property linked to the client? |
IsVisibleLinked | public | Is the action's Visible property linked to the client? |
Fields
FClient | protected | The client control that is linked to the action. |
Inherited
From TActionLink (11)
IsCheckedLinked IsGroupIndexLinked IsHelpContextLinked IsImageIndexLinked IsShortCutLinked SetAutoCheck SetChecked SetGroupIndex SetImageIndex SetShortCut Update
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.
