EnableActions Method
Description
Enables or disables the use of Actions in the command bars.
Syntax
Public Sub EnableActions()
Remarks
EnableActions must be called to enable actions to be used. Each CommandBar Item has an Action property, which is just a reference to the CommandBars Action item that is associated with it. If no action is added for an item or actions have not been enabled, the default properties of the item will be used.
The CommandBarActions Collection allows you to add and access CommandBars Action items to your CommandBars.
CommandBar Actions eliminate the need to use the Update event to update or change the state and properties of an item that appears in multiple places in your menus and toolbars. For example, you might have a menu item that also appears in a toolbar, and then a user might have created the same button and placed it in a user-created toolbar. With Actions, you can simply modify the action for the item, and it will update all occurrences of the item, no matter how many a user might have added.
Actions also work well for localization, as you can have a set of actions for each locale that can easily be used to update all occurrences of items, ensuring that all items get updated.
See Also
Example
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.