cWebCommandbar is a special wrapper object for your web application's global menu and toolbars. The command bar object is designed to position your menus and toolbars outside and above the area occupied by your web views (cWebView). The command bar also manages notification events that need to be sent to menu items (for example OnChangeRights).
A web application can contain, at most, one command bar object. This should be located inside your application's cWebApp object.
A command bar is normally only used in a desktop style web application. If your web application uses the mobile/tablet style and drill down navigation interface, you would normally use a cWebMenuButton control as a menu container.
A command bar will contain, at most, one menu bar object (cWebMenuBar) and any number of toolbars (cWebToolBar). Menu bars and toolbars are, in turn, constructed from nested menu item objects (cWebMenuItem).
Object oWebApp is a cWebApp WebSet pbEnabled of oWebCremeItem to True Object oCommandbar is a cWebCommandBar Object oMenuBar is a cWebMenuBar Object oViewMenu is a cWebMenuItem Set psCaption to "Views" Object oCustomerMenuItem is a cWebMenuItemLoadView Set psCaption to "Customer Maintenance" Set psLoadViewOnClick to "oWebCustomer" End_Object End_Object Object oThemes is a cWebMenuItem Set psCaption to "Themes" Object oModernSky is a cWebMenuItem Set psCaption to "Modern Sky" Procedure OnClick WebSet psTheme of oWebApp to "Vdf_Modern_Sky" End_Procedure End_Object End_Object End_Object Object oFindToolBar is a cWebToolBar Object oFirstMenuItem is a cWebMenuFindFirst End_Object Object oPreviousMenuItem is a cWebMenuFindPrevious End_Object Object oFindMenuItem is a cWebMenuFind End_Object Object oNextMenuItem is a cWebMenuFindNext End_Object Object oLastMenuItem is a cWebMenuFindLast End_Object End_Object End_Object Use WebServiceDispatcher.wo Use SessionManager.wo Use WebCustomer.wo End_Object
The above sample demonstrates a cWebApp containing a typical command bar structure with a menu bar and one toolbar. Notice that some of the menu item objects use specialized classes that are designed for a specific purpose e.g. cWebMenuFindFirst.
The Web Framework uniquely identifies each web object via a combination of the object hierarchy (object nesting), and object name. This means that web object names must be unique within their parent (i.e. each sibling web object must have a unique name).
Your cWebCommandBar object must be placed within the main web application object (cWebApp).
By default, a cWebCommandBar spans the entire width of the screen (the amount of space it gets in HTML). the height stretches to fit its contents and its basic height is defined by the theme (psTheme).
This control can be used as a valid drop target by registering it as such in a cWebDragDropHelper object.
The supported actions for this control are:
This allows the control to accept data dragged from elsewhere in the control (if configured that way) and can also be used to accept files when registered within a cWebDragDropFileHelper.