TCustomAction class
TCustomAction is the ancestor class for
TAction.Declaration
TCustomAction = class(TContainedAction)Inheritance
Descends from it: TAction TCommonDialogAction TCustomHintAction TFileExit TSearchFindNext
Description
TCustomAction is a generic class for all components that
represents actions that can be be set on the user interface for buttons and
other controls.
TCustomAction is the ancestor for
TAction. If you want to define your own action class, you should
derive it from this class.
You can assign a action to a component by using the Object Inspector.
Modified in LCL version 4.0 to improve compatibility with newer Delphi VCL versions. Some methods were redefined as virtual and changed to protected visibility.
See also
Properties
SavedEnabledState | protected | SavedEnabledState - if True, the Enabled state has been saved. |
AutoCheck | public | AutoCheck - whether the control (e.g. a CheckBox) is to be automatically checked. |
Caption | public | The Caption to be used if this action is associated with a visible component. |
Checked | public | Whether the check box control associated with the action is Checked (default False). |
Grayed | public | True if the action (and it client control) are in the grayed or indeterminate state. |
DisableIfNoHandler | public | Prevents the action from executing if an OnExecute handler is not assigned in the action. |
Enabled | public | Enabled - whether this action is able to be used (default is True). |
GroupIndex | public | GroupIndex- Index of the action within its group. |
HelpContext | public | HelpContext - the index for a context-based help message. |
HelpKeyword | public | HelpKeyWord - the keyword of a context-based help message. |
HelpType | public | HelpType - the sort of help message to be offered: default Context-based. |
Hint | public | Hint - a pop-up message that appears when the mouse hovers over an object. |
ImageIndex | public | ImageIndex - the index number of the image to be associated with this action. |
SecondaryShortCuts | public | SecondaryShortCuts - a stringlist containing shortcuts. |
ShortCut | public | ShortCut- an index to a shortcut list. |
Visible | public | Visible - is this action visible? (default True). |
Methods
AssignTo | protected | Copies property from the class instance to the specified persistent object. |
HandleShortCut | protected | Returns True if the action is enabled and executed successfully. |
SetAutoCheck | protected | Sets the value for the AutoCheck property. |
SetCaption | protected | Sets the value for the Caption property. |
SetChecked | protected | Sets the value for the Checked property. |
SetEnabled | protected | Sets the value for the Enabled property. |
SetGroupIndex | protected | Sets the value for the GroupIndex property. |
SetHelpContext | protected | Sets the value for the HelpContext property. |
SetHelpKeyword | protected | Sets the value for the HelpKeyword property. |
SetHelpType | protected | Sets the value for the HelpType property. |
SetHint | protected | Sets the value for the Hint property. |
SetImageIndex | protected | Sets the value for the ImageIndex property. |
SetName | protected | Sets the value for the Name property. |
SetShortCut | protected | Sets the value for the ShortCut property. |
SetVisible | protected | Sets the value for the Visible property. |
Create | public | Constructor for the class instance. |
Destroy | public | Destroy - destructor for TCustomAction: frees various lists and images, then calls inherited Destroy. |
DoHint | public | DoHint - method for displaying the hint contained in HintStr if True value is returned. |
Execute | public | Executes the action using an available OnExecute event handler. |
Events
OnHint | public | OnHint - action to be taken when a hint is required. |
Fields
FImage | protected | |
FMask | protected |
Inherited
From TContainedAction (8)
ActionList Category GetParentComponent HasParent Index ReadState SetParentComponent Update
From TBasicAction (16)
ActionComponent Change ClientCount Clients ExecuteTarget GetClient HandlesTarget Notification OnChange OnExecute OnUpdate RegisterChanges SetOnExecute Suspended UnRegisterChanges UpdateTarget
From TComponent (68)
_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetTypeInfo GetTypeInfoCount iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (4)
Assign FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (37)
AfterConstruction 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 StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
