Class: cCJToolbar
Properties | Events | Methods | Index of Classes
Used to create toolbars within a commandbar system
Hierarchy
cObject > DfComAutomationObject > cComAutomationObject > cCJCommandBar > cCJAbstractCommandBar > cCJToolbar
Show full hierarchy and direct subclasses
Library: Windows Application Class Library
Package: cCJCommandBarSystem.pkg
Description
The cCJToolbar class is used to create toolbar objects within a commandbar system. Any number of toolbars are allowed within a commandbar system. Toolbar objects will always be children inside of a cCJCommandbarSystem object. The menu items within a toolbar will based on cCJMenuItem.
Object oCommandBarSystem is a cCJCommandBarSystem
Object oMenuBar is a cCJMenuBar
:
End_Object
Object oFindToolBar is a cCJToolbar
Set psTitle to "Finding Toolbar"
Object oFindFirstTool is a cCJFindFirstMenuItem
End_Object
Object oFindPreviousTool is a cCJFindPreviousMenuItem
End_Object
Object oFindMenuTool is a cCJFindMenuItem
End_Object
Object oFindNextTool is a cCJFindNextMenuItem
End_Object
Object oFindLastTool is a cCJFindLastMenuItem
End_Object
Object oPromptToolItem is a cCJPromptMenuItem
Set pbControlBeginGroup to True
End_Object
End_Object
Object oFileToolBar is a cCJToolbar
:
End_Object
Object oEditToolBar is a cCJToolbar
:
End_Object
:
End_Object
| Col 1 | Col 2 |
|---|---|
| Note: | For an overview on the commandbar system, refer to Using Menus, Toolbars and Statusbars |
Default Toolbar Characteristics
By default toolbars will have the following characteristics: It will be a horizontal bar (peBarPosition=xtpBarTop)It can be moved, floated and docked (pbEnableDocking=True, pbGripper=True)It's width is determined by the number of items in the bar (i.e., it is not stretched) and multiple toolbars can share the same row (peStretched=stNoStretch)It will dock itself to the right of a previous toolbar that is in the same position (pbDockNextTo=True)It can be closed (pbCloseable=True)It can be edited (pbCustomizable=True).When needed, it wraps to the next line (pbHideWrap=False)
The Toolbar Creation Process
When the commandbar system is created, the message CreateComInstance is sent to all cCJToolBar objects. This method is used to:
- Create the COM toolbar.
- Send the appropriate COM messages.
- Send the OnCreate event. This can be used by developers to customize the creation process
- Create all child menu objects by sending CreateComInstance to all child objects.
Once the COM object is created, it remains statically bound to its cCJToolBar proxy object.
See Also