As you are developing your application, you can create a set of actions that you can use on various UI elements. You can organize them into categories that can be dropped onto a menu as a set (for example, Cut, Copy, and Paste) or one at a time ( for example, ToolsCustomize ).
An action corresponds to one or more elements of the user interface, such as menu commands or toolbar buttons. Actions serve two functions: (1) they represent properties common to the user interface elements, such as whether a control is enabled or checked, and (2) they respond when a control fires, for example, when the application user clicks a button or chooses a menu item. You can create a repertoire of actions that are available to your application through menus, through buttons, through toolbars, context menus, and so on.
Actions are associated with other components:
The client influences the action—the action responds when a client fires the action. The action also influences the client—action properties dynamically update the client properties. For example, if at runtime an action is disabled (by setting its Enabled property to False), every client of that action is disabled, appearing grayed.
You can add, delete, and rearrange actions using the Action Manager or the Action List editor (displayed by double-clicking an action list object, TActionList). These actions are later connected to client controls. See Creating toolbars and menus and, for cross-platform development, Setting up action lists for details.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!