Class: cWebToolBar

Properties  Events  Methods    Index of Classes

The Web Framework toolbar container

Hierarchy

cObject
---cWebObject
------cWebBaseUIObject
---------cWebBaseDEOServer
------------cWebBaseControl
---------------cWebToolBar
------------------cWebActionBar

Library: Web Application Class Library

Package: cWebToolbar.pkg

Mixins: cWebBaseMenu_mixin

Description

The cWebToolBar class is used as a wrapper for your web application's toolbars. A toolbar is designed to host and group the buttons of a toolbar located in the command bar area of your web application.

A toolbar should be located inside your application's command bar object (see cWebCommandBar). 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).

When positioned like a control, items that do not fit inside the toolbar are now automatically placed inside a submenu.

Sample

Object oFindToolBar is a cWebToolBar
    Object oFirstMenuItem is a cWebMenuFindFirst
    End_Object  

    Object oPreviousMenuItem is a cWebMenuFindPrevious
    End_Object  

    Object oNextMenuItem is a cWebMenuFindNext
    End_Object  
    
    Object oLastMenuItem is a cWebMenuFindLast
    End_Object
                   
    Object oPromptMenuItem is a cWebMenuPrompt
    End_Object
    
    Object oMessageItem is a cWebMenuItem
        Set psImage to "Click.jpg"
        Set psTooltip to "Click Me Please!"
        
        Procedure OnClick
            Send ShowInfoBox "This button was clicked!"
        End_Procedure
    End_Object
End_Object

The above sample demonstrates a toolbar (cWebToolBar) containing six buttons.

Five of the button objects use special subclasses of cWebMenuItem, for example cWebMenuFindNext. These subclasses are pre-fabricated to perform a single task (in this case request the focused view to find the next record).

Object Name

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).

Object Placement

Your cWebToolBar objects must be placed within a command bar object (cWebCommandBar).