From RAD Studio API Documentation
Jump to: navigation, search



TCustomAction = class(TContainedAction)


class PASCALIMPLEMENTATION TCustomAction : public System::Actions::TContainedAction


Type Visibility Source Unit Parent
class public
Vcl.ActnList Vcl.ActnList


TCustomAction is the base class for VCL actions intended to be used with menu items and controls.

TCustomAction introduces support for the properties, events, and methods of menu items and controls that are clients of action objects.

Most properties and events introduced in TCustomAction are public; therefore, use TCustomAction as a base class when deriving your own actions that publish specific subset of properties of associated controls.

Action objects centralize the response to user commands (actions) and represent user interface elements in applications that use actions. They provide an easy way to synchronize, for example, the enabled state and caption of a speed button and a menu item, and handle the response when users click these components. Each such component, called the client, has its properties dynamically updated by the action and forwards user actions to the action for a response.

At design time, you can work in the Action List editor with actions contained in an action list or in the Action Manager editor of the action manager. The action list or action manager is a container for actions, which it organizes into categories.

Component and control public properties and events that are supported in TCustomAction, either directly or through an ancestor, are:

Because the OnHint, OnUpdate, and OnExecute events are public, they do not appear in the Object Inspector. That is, the Object Inspector does not support generating custom event handlers for these events.

TCustomAction can also act as the base class for predefined action classes. You can derive from TCustomAction if you want to retain the public scope of supported properties and events or modify the public scope to the published scope.

For predefined actions that augment the behavior of TCustomAction, see the action classes in the Vcl.StdActns, Vcl.DBActns, and Vcl.ExtActns units.

See Also

Code Examples