Home
Categories
Dictionnary
Download
Project Details
Changes Log
FAQ
License

Toolbars



All the toolbars which should appear on a window must be under a toolbox element. The toolbox has one toolbar child for each toolbar.

GUI structure

Each toolbar can contain several types of children:
  • toolbarbutton for buttons in the toolbar
  • toolbaritem for elements which are not buttons. The toolbaritem is a XUL container for other types of controls

Merging toolbars

If several XULDocuments are installed in the same Swing frame or window, then all their toolbars will be merged.

Example

Example with only buttons

    <window id="Test" title="My Window" orient="horizontal"
      xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
      <toolbox>        
        <toolbar id="nav-toolbar">
          <toolbarbutton id="nav-users"  label="Users"/>
          <toolbarbutton id="nav-groups" label="Groups"/>
          <toolbarbutton id="nav-events" label="Events" disabled="true"/>
        </toolbar>  
      </toolbox>    
   </window>                    

The result is:


toolbar

Example with non button items

    <window id="Test" title="My Window" orient="horizontal"
      xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
      <toolbox>        
        <toolbar id="nav-toolbar">
          <toolbarbutton id="nav-users"  label="Users"/>
          <toolbaritem>
            <textbox value="The text" cols="10"/>
          </toolbaritem>
          <toolbarbutton id="nav-events" label="Events"/>
        </toolbar>  
      </toolbox>    
   </window>                    

The result is:


toolbaritem

See also


Categories: controls

Copyright 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence