Class: cCJAction

Properties  Events  Methods    Index of Classes

Abstract class (usually) to manage the "action" component of menu item

Hierarchy

cObject
---DfComAutomationObject
------cComAutomationObject
---------cCJCommandBarAction
------------cCJAction
---------------cCJMenuItem

Library: Windows Application Class Library

Package: cCJCommandBarSystem.pkg

Description

The cCJAction class is usually treated as an abstract class. It provides "action" support to cCJMenuItem objects. An action is the part of a menu item that contains properties, events and methods that are common to all items of any control type. Examples of this are text (psCaption), images (psImage) and execution (OnExecute). These are common to all control types and they are all managed by a COM action object.

Internally the Codejock controls create separate COM objects for actions and controls. The cCJAction class contains all of the required support for COM actions. Its sub-class, the cCJMenuItem class adds the extra support for the COM control. Codejock supports actions to facilitate end user menu customization. When a user creates a copy of a menu item or creates a new menu item, a new DataFlex cCJMenuItem object is not created. Only a new COM control is created and that COM control points to the action that the object was copied or created from. That action object does have a DataFlex proxy object. In such a case, this action object will now manage more than one COM control. For the most part, this is technical detail that should be of no concern to the developer.

It is possible to create objects based on cCJAction. If you do this those objects should be immediate children of the cCJCommandBarSystem object. cCJMenuItem objects can then be bound to the action by setting their phoAction property. Normally this technique is not encouraged because it limits the ability of the Studio's visual designer to fully model a menu-item. It will not be able to show you the image and text defined in the action. When mutliple instances of the same menu-item are required, the use of sub-classing is recommended.

Note:For an overview on the commandbar system, refer to Using Menus, Toolbars and Statusbars

See Also

cCJCommandBarSystem | cCJMenuItem