[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'ActnList' (#lcl)

TCustomAction

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

TCustomAction is the ancestor class for TAction

Declaration

Source position: actnlist.pas line 157

type TCustomAction = class(TContainedAction)

protected

  FImage: TObject;

  

  FMask: TObject;

  

  procedure AssignTo(); override;

  procedure SetName(); override;

  

  function HandleShortCut; virtual;

  

HandleShortCut - returns True if there is a short cut associated with the handle

  property SavedEnabledState: Boolean; [rw]

  

SavedEnabledState - if True, the Enabled state has been saved

public

  constructor Create(); override;

  

Create - constructor for TCustomAction: calls inherited Create then initialises some local variables

  destructor Destroy; override;

  

Destroy - destructor for TCustomAction: frees various lists and images, then calls inherited Destroy

  function DoHint(); virtual;

  

DoHint - method for displaying the hint contained in HintStr if True value is returned

  function Execute; override;

  property AutoCheck: Boolean; [rw]

  

AutoCheck - whether the control (eg a CheckBox) is to be automatically checked

  property Caption: TTranslateString; [rw]

  

The Caption to be used if this action is associated with a visible component

  property Checked: Boolean; [rw]

  

Whether the CheckBox associated with the action is Checked (default False)

  property DisableIfNoHandler: Boolean; [rw]

  

DisableIfNoHandler - don't use this action if no Handler has been provided

  property Enabled: Boolean; [rw]

  

Enabled - whether this action is able to be used (default True)

  property GroupIndex: Integer; [rw]

  

GroupIndex - Index of the action within its group

  property HelpContext: THelpContext; [rw]

  

HelpContext - the index for a context-based help message

  property HelpKeyword: String; [rw]

  

HelpKeyWord - the keyword of a context-based help message

  property HelpType: THelpType; [rw]

  

HelpType - the sort of help message to be offered: default Context-based

  property Hint: TTranslateString; [rw]

  

Hint - a pop-up message that appears when the mouse hovers over an object

  property ImageIndex: TImageIndex; [rw]

  

ImageIndex - the index number of the image to be associated with this action

  property OnHint: THintEvent; [rw]

  

OnHint - action to be taken when a hint is required

  property SecondaryShortCuts: TShortCutList; [rws]

  

SecondaryShortCuts - a stringlist containing shortcuts

  property ShortCut: TShortCut; [rw]

  

ShortCut - an index to a shortcut list

  property Visible: Boolean; [rw]

  

Visible - is this action visible? (default True)

end;

Inheritance

TCustomAction

  

TCustomAction is the ancestor class for TAction

|

TContainedAction

  

TContainedAction - parent class for TCustomAction; defines some properties especially relationships with parents

|

TBasicAction

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent

|

TObject

Description

TCustomAction is a generic class for all components that represent 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.

See also

TAction

  

TAction is the basic action object used on the LCL.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.