Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

XUL 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

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:
xul-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:
xul-toolbaritem

See also


Categories: builtin-applis

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence