Defines classes for Actions and Lists of actions to be used with LCL components Deallocates an object If you call Destroy for an object witch hasn´t being initialized yet it will generate an error. Always use the Free method to deallocate objects, because it verifies if object variable doesn´t contain the value nil. Take the following precautions when creating your own Destroy method: * Declare Destroy with the override directive, because it is a virtual method. * Always call 'inherited Destroy;' as the last thing on the destructor code. * An exception may be raised on the constructor in case there is not enought memory to create an object, or something else goes wrong. If the exception is not handled inside the constructor, the object will be only partially built. In this case Destroy will be called, so your destructor must check if the resources were really allocated before disposing of them. * Remember to call Free for all objects created on the constructor. TCustomActionList - the ancestor class for TActionList

TCustomActionList - the ancestor class for TActionList. If you want to define your own action list class, you should derive it from this class.

TActionList, TAction, TActionLink and TContainedAction are used to centralize the implementation of user commands, and can then be linked to the appropriate button, menu or another component. This is an Object-Oriented programming strategy to reuse the code, as opposed to the Event-Oriented approach of writing an OnClick event for each component.

Create a new instance of the TCustomActionList class Destroy - Deallocates an object The Images from an ImageList to be associated with the actions, eg in a Menu display TActionList - The basic actions list class

TActionList - The basic actions list class

TActionList is the last component on the "Standard" component pallete on the Lazarus IDE.

To use an ActionList, click on the icon on the IDE Standard Components toolbar, then click anywhere on the main form and an ActionList icon will appear. It doesn't matter where you position it, because it is not visible at run-time.

You can add, remove or modify actions on the list by right-clicking on the ActionList icon on the form editor and then choosing "Edit action list...", or by double-clicking on the icon with the left mouse button. This will open the "Action List Editor".

You can now use the "+" and "-" buttons to add and remove actions. The ActionList editor menu allows you to select standard actions from a selection (option 'New Standard Action') or create a new action (option 'New Action'). To edit an action, click it and then open the object inspector. To add code to be executed when an action is triggered, double-click the action's name on the "Action List Editor".

The TActionList Class introduces very few properties of its own, but inherits a lot from its ancestor, TCustomActionList, and related components TAction, TCustomAction, TContainedAction and TBasicAction

Each entry in the ActionList appears in the Object Inspector as an instance of TAction, and its properties are accessible and modifiable from the Object Inspector

TCustomAction is the ancestor class for TAction

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.

Create a new instance of the TCustomAction class Destroy - Deallocates an object DoHint - method for displaying the hint contained in HintStr if True value is returned True if hint is to be displayed HintStr - the text-string for display as a hint Execute - method to determine if action is to be performed True if action is to be performed AutoCheck - whether the control (eg a CheckBox) is to be automatically checked The Caption to be used if this action is associated with a visible component Whether the CheckBox associated with the action is Checked (default False) DisableIfNoHandler - don't use this action if no Handler has been provided Enabled - whether this action is able to be used (default True) GroupIndex - Index of the action within its group HelpContext - the index for a context-based help message HelpKeyWord - the keyword of a context-based help message HelpType - the sort of help message to be offered: default Context-based Hint - a pop-up message that appears when the mouse hovers over an object ImageIndex - the index number of the image to be associated with this action ShortCut - an index to a shortcut list SecondaryShortCuts - a stringlist containing shortcuts Visible - is this action visible? (default True) OnHint - action to be taken when a hint is required TAction is the basic action object used on the LCL.

TAction is the basic action object used on the LCL.

It redeclares many properties inherited from TCustomAction on the public section, but does not add any new features. For more details look at the See Also section for TCustomAction.

The properties of each Action can be modified at design time in the Object Inspector