Sign in Join
FPDoc Onlineexperiment

TCustomAction class

In unit ActnList

TCustomAction is the ancestor class for TAction.

Declaration

pascal
TCustomAction = class(TContainedAction)

Inheritance

  1. TCustomAction
  2. TContainedAction
  3. TBasicAction
  4. TComponent
  5. TPersistent
  6. TObject

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

SavedEnabledStateprotectedSavedEnabledState - if True, the Enabled state has been saved.
AutoCheckpublicAutoCheck - whether the control (e.g. a CheckBox) is to be automatically checked.
CaptionpublicThe Caption to be used if this action is associated with a visible component.
CheckedpublicWhether the check box control associated with the action is Checked (default False).
GrayedpublicTrue if the action (and it client control) are in the grayed or indeterminate state.
DisableIfNoHandlerpublicPrevents the action from executing if an OnExecute handler is not assigned in the action.
EnabledpublicEnabled - whether this action is able to be used (default is True).
GroupIndexpublicGroupIndex- Index of the action within its group.
HelpContextpublicHelpContext - the index for a context-based help message.
HelpKeywordpublicHelpKeyWord - the keyword of a context-based help message.
HelpTypepublicHelpType - the sort of help message to be offered: default Context-based.
HintpublicHint - a pop-up message that appears when the mouse hovers over an object.
ImageIndexpublicImageIndex - the index number of the image to be associated with this action.
SecondaryShortCutspublicSecondaryShortCuts - a stringlist containing shortcuts.
ShortCutpublicShortCut- an index to a shortcut list.
VisiblepublicVisible - is this action visible? (default True).

Methods

AssignToprotectedCopies property from the class instance to the specified persistent object.
HandleShortCutprotectedReturns True if the action is enabled and executed successfully.
SetAutoCheckprotectedSets the value for the AutoCheck property.
SetCaptionprotectedSets the value for the Caption property.
SetCheckedprotectedSets the value for the Checked property.
SetEnabledprotectedSets the value for the Enabled property.
SetGroupIndexprotectedSets the value for the GroupIndex property.
SetHelpContextprotectedSets the value for the HelpContext property.
SetHelpKeywordprotectedSets the value for the HelpKeyword property.
SetHelpTypeprotectedSets the value for the HelpType property.
SetHintprotectedSets the value for the Hint property.
SetImageIndexprotectedSets the value for the ImageIndex property.
SetNameprotectedSets the value for the Name property.
SetShortCutprotectedSets the value for the ShortCut property.
SetVisibleprotectedSets the value for the Visible property.
CreatepublicConstructor for the class instance.
DestroypublicDestroy - destructor for TCustomAction: frees various lists and images, then calls inherited Destroy.
DoHintpublicDoHint - method for displaying the hint contained in HintStr if True value is returned.
ExecutepublicExecutes the action using an available OnExecute event handler.

Events

OnHintpublicOnHint - action to be taken when a hint is required.

Fields

FImageprotected
FMaskprotected

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.