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
FMX.ActnList FMX.ActnList


TCustomAction is a base class for FireMonkey 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 actions.

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.

Actions centralize responses to user commands (user actions). An action is associated with the user interface elements (components) in an application that uses this action. Actions provide an easy way to synchronize values of properties of an action and of associated components (clients), for example, the enabled state and caption of an action and of an associated speed button and a menu item, and handle the response when the user clicks these components. Each component, which is called the client, has its properties dynamically updated by the associated action and forwards user commands to the action for a response.

The Text property can be used to set an accelerator key to the action. Notice that & and _ are seen and can be used only for Windows.

At design time, you can work in the Action List editor with actions contained in an action list. The action list is a container for actions, organized into categories (File, Edit, and others).

Public properties and events of a component and control that are supported in TCustomAction, either directly or through an ancestor, are the following:

TCustomAction is the base class for TAction and TCustomViewAction.

TCustomAction acts as the base class for several predefined action classes. For predefined actions that augment the behavior of TCustomAction, see the action classes in the FMX.StdActns unit.

Code Examples

See Also