Non-MDI Commandbar Systems
Commandbar systems can be placed inside any container. For example, they can be placed inside views or tab dialog pages. When used in this fashion, you will often use only some of the components. For example, if you need a toolbar, you would create a commandbar system that only contains a toolbar.
Non-MDI commandbar systems are a little less automatic than their MDI counterparts. There is no client area that can be automatically adjusted, so you must design the toolbars, status bar, etc., so they visually fit with the other components in the container. Typically, you will not make toolbars dockable because moving them around would require that you adjust the locations of the other objects in the container to accommodate the change. This could be done, but it would be a lot of work.
Example: Adding a Toolbar to a View
This sample shows how a toolbar can be added to a view.
Activate_View Activate_oCustomerView for oCustomerView
Object oCustomerView is a dbView
Set Border_Style to Border_Thick
Set Label to "Customer Entry View"
Set Location to 13 7
Set Size to 181 289
Object Customer_DD is a Customer_DataDictionary
End_Object // Customer_DD
Set Main_DD to Customer_DD
Set Server to Customer_DD
Object oCustomerCommandBars is a cCJCommandBarSystem
Procedure OnCreate
Integer eTheme
// apply the same visual theme used by the global commandbars
Move ghoCommandBars to hoGlobalBars
If (ghoCommandBars) Begin
Get peVisualTheme of ghoCommandBars to eTheme
Set peVisualTheme to eTheme
End
Forward Send OnCreate
End_Procedure
Object oFindToolBar is a cCJToolbar
Set pbCloseable to False
Set pbEnableDocking to False
Set pbGripper to False
Set peStretched to stStretch
Set pbDockNextTo to False
Object oFindFirstTool is a cCJFindFirstMenuItem
End_Object
Object oFindMenuTool is a cCJFindMenuItem
End_Object
Object oFindPreviousTool is a cCJFindPreviousMenuItem
End_Object
End_Object
End_Object
Object oContainer is a dbContainer3d
// set the location so it appears below the toolbar
Set Location to 19 0
Set Size to 145 270
// add all of your DEO controls here
:
End_Object
End_Object