MDN wants to learn about developers like you:

A container for toolbars. It is a type of box but defaults to vertical orientation. If a toolbar is placed inside a toolbox, a grippy is displayed on its left or upper edge. The user may click the grippy to collapse the toolbar. If multiple toolbars are placed in the same toolbox, they will all collapse into the same row. The Firefox browser does not have grippies so toolbars cannot be collapsed and expanded.

Note: Gecko 2.0 adds support for external toolbars. These are toolbars that are not children of a toolbox. You can associate an external toolbar with a toolbox for the purpose of managing your toolbars by setting the toolboxid property on the toolbar. The external toolbars associated with a toolbox are listed in the array of elements provided by the toolbox's externalToolbars property.

More information is available in the XUL tutorial.

If you'd like to detect when toolbars in a toolbox are changed, see Toolbar customization events.

accessible, customToolbarCount, externalToolbars, palette, toolbarset
appendCustomToolbar, collapseToolbar, expandToolbar



<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="yourwindow" xmlns="" title="toolbox example" width="300">
      <toolbarbutton label="Back"/>
      <toolbarbutton label="Forward"/>
      <toolbarbutton label="Home"/>
      <toolbarbutton label="Stop"/>
      <toolbarbutton label="Reload"/>
  <textbox multiline="true" value="We have two toolbars inside of one toolbox above." width="20"/>


Inherited from XUL element
align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortDirection, sortResource, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width


Type: nsIAccessible
Returns the accessibility object for the element.
Type: array of elements
An array of external toolbars; that is, toolbar elements that should be considered to be members of this toolbox, even if they are not actually children of the toolbox.
Firefox only
Type: element
The toolbarpalette within the toolbox.
Firefox only
Type: element
The toolbarset within the toolbox.


Inherited Methods
addEventListener(), appendChild(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), hasChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), removeChild(), removeEventListener(), replaceChild(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData

appendCustomToolbar( name, currentset )
Firefox only
Return type: element
Adds a custom toolbar to the toolbox with the given name. You can supply a comma-separated list of toolbar item ids as the second argument to add some items by default. The method returns the DOM element for the created toolbar.
collapseToolbar( toolbar )
Not in Firefox
Return type: no return value
Collapse the given toolbar which should be contained within the toolbox.
expandToolbar( toolbar )
Not in Firefox
Return type: no return value
Expand the given toolbar which should be contained in the toolbox.

toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring

Document Tags and Contributors

 Contributors to this page: Sheppy, kscarfone, trevorh, Gryllida, q0k, Mgjbot, Ptak82, Dria, Pmash
 Last updated by: Sheppy,