BasicAction#

Qualified name: delphivcl.BasicAction

class BasicAction#

Bases: Component

TBasicAction is the ancestor class for all action objects. TBasicAction introduces the fundamental behavior for an action. Descendants of TBasicAction add functionality for containment in an action list, for being categorized, and for specializing their behavior tailored to particular clients such as controls or menu items. Use TBasicAction if you want to create an action for an object that is neither a menu item nor a control.

Methods

Create

Instantiates and initializes a TBasicAction object.

Destroy

Disposes of an instance of a TBasicAction object.

Execute

Generates an OnExecute event.

ExecuteTarget

Introduces an interface for invoking an action on a target client component or control.

HandlesTarget

Introduces an interface for verifying that the type and state of a target component or control are appropriate for the action.

Suspended

Embarcadero Technologies does not currently have any additional information.

Update

Provides an opportunity to execute centralized code when an application is idle.

UpdateTarget

Introduces an interface for a method of notifying a client when the action updates itself.

Attributes

ActionComponent

Stores the client component that caused this action to execute.

ClassName

Returns the TObject.ClassName

ComObject

Specifies the interface reference implemented by the component.

ComponentCount

Indicates the number of components owned by the component.

ComponentIndex

Indicates the position of the component in its owner's Components property array.

ComponentState

Describes the current state of the component, indicating when a component needs to avoid certain actions.

ComponentStyle

Governs the behavior of the component.

Components

<Delphi indexed property Components of type TComponent at 21141642500>

DesignInfo

Contains information used by the Form designer.

Name

Specifies the name of the component as referenced in code.

Observers

Indicates the TObservers object added to the TComponent.

OnExecute

<Delphi property OnExecute of type TBasicAction at 211416603D0>

OnUpdate

<Delphi property OnUpdate of type TBasicAction at 211416604A0>

Owner

Indicates the component that is responsible for streaming and freeing this component.

Tag

Stores a NativeInt integral value as a part of a component.

VCLComObject

Represents information used internally by components that support COM.

ActionComponent#

Stores the client component that caused this action to execute. Use ActionComponent to discern which client component caused this action to execute. For example, examine ActionComponent from an OnExecute event handler if you need to know what user action triggered this action. When the user clicks a client control, that client sets ActionComponent before calling the action’s Execute method. After the action executes, the action resets ActionComponent to nil (Delphi) or NULL (C++).

Create(AOwner: Component)#

Instantiates and initializes a TBasicAction object. Applications do not need to instantiate TBasicAction directly. Actions are created automatically when you choose New Action in the Action List editor. If you want to create an action at run time, you should call the Create constructor of a FireMonkey action (FMX.ActnList.TAction) or VCL action (Vcl.ActnList.TAction), or any of their subclasses. The Create constructors assign a TActionList component to the ActionList property of the created action. Create calls the inherited constructor and then creates a list of clients of the created action.

Destroy()#

Disposes of an instance of a TBasicAction object. You do not need to call the destructor for an action. An action is a component and is automatically destroyed by its owner, which was passed to the constructor when it is created. If you must destroy an action manually, call Free instead, which safely invokes the destructor.

Execute()#

Generates an OnExecute event. Execute calls the OnExecute event handler, if one is assigned. Execute returns True if an event handler is called, False otherwise.

ExecuteTarget(Target: Object)#

Introduces an interface for invoking an action on a target client component or control. ExecuteTarget does nothing in TBasicAction. ExecuteTarget was introduced in TBasicAction so that descendants can override it to initiate the action on the target. For example, an edit action that performs copying might copy the contents of an edit control to the clipboard.

HandlesTarget(Target: Object) Boolean#

Introduces an interface for verifying that the type and state of a target component or control are appropriate for the action. HandlesTarget does nothing in TBasicAction. HandlesTarget was introduced in TBasicAction so that descendants can override it to check the type and state of a target. HandlesTarget can verify any information about a target that is relevant for the action. HandlesTarget returns True if the target meets the specified criteria, False otherwise.

OnExecute#

<Delphi property OnExecute of type TBasicAction at 211416603D0>

OnUpdate#

<Delphi property OnUpdate of type TBasicAction at 211416604A0>

Suspended()#

Embarcadero Technologies does not currently have any additional information.

Update()#

Provides an opportunity to execute centralized code when an application is idle. Update triggers the OnUpdate event handler. Update returns True if an event handler was found, False otherwise. When the application is idle, the OnUpdate event occurs for every action. This provides an opportunity for applications to execute centralized code for enabling and disabling, checking and unchecking, and so on.

UpdateTarget(Target: Object)#

Introduces an interface for a method of notifying a client when the action updates itself. UpdateTarget does nothing in TBasicAction. UpdateTarget was introduced in TBasicAction so that descendants can override it to correspondingly update a target when the action updates.