FireMonkey Actions

From RAD Studio
Jump to: navigation, search

Go Up to FireMonkey Applications Guide


FireMonkey extends the RTL implementation of actions as follows:

  • It defines TAction, which extends the functionality of TContainedAction.
  • It defines in the FMX.StdActns unit many standard actions that you can use in your applications.
  • It defined TActionList, a component that you can use to manage the action that your application uses.

Using Actions

To use actions in FireMonkey:

  1. Add a TActionList component to your application to create a list of actions that are available to your application through menus, controls, toolbars, context menus, and so on.
  2. Use the Action List editor to manage your action list component.

Adding Actions to Your Action List

To add a custom action to your action list component:

  1. Double-click your action list component to open the Action List editor.
  2. Right-click the Categories or Actions (FMX) pane.
  3. Choose New Action on the context menu. The new action appears in the Actions (FMX) pane.

To add standard actions to your action list component:

  1. Double-click your action list component to open the Action List editor.
  2. Right-click the Categories or Actions (FMX) pane.
  3. Choose New Standard Action on the context menu. The Standard Action Classes dialog box opens and shows a list of standard actions.
    Note: Standard actions are organized into categories, such as "File", "View", "Edit", "Help", and "Window".
  4. Select the standard actions you want to add to the action list and click OK.

Editing the Properties and the Events of an Action

To edit the properties and the events of an action of your action list component:

  1. Double-click your action list component to open the Action List editor.
  2. Select the target action.
  3. Use the Object Inspector to edit the properties and the events of the selected action.

Associating a Client with an Action

To associate a client with the action that it triggers, select the client component in the Object Inspector, and select the action that it triggers in its Action property. The Object Inspector shows the list of actions of your action list component in the drop-down list of the Action property.

See Also