References > " . "Element Reference"; $pagetitle="Toolbar"; $customsidebar = "elemref-sidebar.php"; include "header.php"; ?>

Toolbar

A container which typically contains a row of buttons. It is a type of box that defaults to horizontal orientation. It can be collapsed with a grippy when the toolbar is placed inside a toolbox. The toolbar should always have an id attribute. Firefox supports toolbar customization, whereas the Mozilla browser does not.

More information about toolbar

The toolbar element implements the following interfaces:

nsIAccessibleProvider  

Attributes:

currentset customindex customizable defaultset grippyhidden
toolbarname

Properties and Methods:

accessible currentSet firstPermanentChild insertItem lastPermanentChild
toolbarName

Attributes:

Inherited from XUL Element:

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

currentset    Firefox only

The current set of displayed items on the toolbar. This should be set to a comma-separated list of item IDs from the toolbarpalette.

customindex    Firefox only

This value is the index of the toolbar in the list of the custom toolbars. The value is updated automatically by the toolbar customization dialog.

customizable    Firefox only

Set this attribute to true on toolbars that can be customized. This causes the set of buttons to be persisted across sessions.

defaultset    Firefox only

The default set of displayed items on the toolbar. This should be set to a comma-separated list of item IDs from the toolbarpalette. For example, 'back-button,forward-button,print-button'.

grippyhidden    Not in Firefox

Type: boolean

When set to true, the grippy will be hidden. When set to false, the default, the grippy will be shown.

toolbarname    Firefox only

The name of the toolbar, which is listed in the Show/Hide toolbars menu.


Properties and Methods:

Inherited from XUL Element:

align
allowEvents
blur
boxObject
boxObject.element
boxObject.getLookAndFeelMetric
boxObject.height
boxObject.screenX
boxObject.screenY
boxObject.width
boxObject.x
boxObject.y
builder
className
click
collapsed
contextMenu
controllers
database
datasources
dir
doCommand
flex
focus
getElementsByAttribute
height
hidden
id
left
maxHeight
maxWidth
menu
minHeight
minWidth
observes
ordinal
orient
pack
persist
ref
resource
statusText
style
tooltip
tooltipText
top
width

Inherited from Element:

addEventListener
appendChild
attributes
childNodes
cloneNode
dispatchEvent
firstChild
getAttribute
getAttributeNS
getAttributeNode
getAttributeNodeNS
getElementsByTagName
getElementsByTagNameNS
hasAttribute
hasAttributeNS
hasAttributes
hasChildNodes
insertBefore
isSupported
lastChild
localName
namespaceURI
nextSibling
nodeName
nodeType
nodeValue
normalize
ownerDocument
parentNode
prefix
previousSibling
removeAttribute
removeAttributeNS
removeAttributeNode
removeChild
removeEventListener
replaceChild
setAttribute
setAttributeNS
setAttributeNode
setAttributeNodeNS
tagName

accessible

Type: nsIAccessible

Returns the accessibility object for the toolbar.

currentSet    Firefox only

Holds a comma separated list of the items currently on the toolbar. This will be modified when the user customizes the toolbar. You may change the current set of items by setting this property.

firstPermanentChild    Firefox only

The first permanent child of the toolbar. A permanent child is one that is not customizable and remains on the toolbar. Items that are placed directly inside the toolbar without being in the toolbarpalette are permanent.

insertItem ( id , beforeNode , wrapper , beforePermanent )     Firefox only

Add an item with the given id to the toolbar. The new item is added just before the item given by the second argument. If the second argument is null, but the beforePermanent argument is true, the item is added to the beginning of the toolbar before the first permanent item. Otherwise, if the beforePermanent argument is false, the new item is added to the end of the toolbar. The third argument can be used to wrap the new item in another element. Usually, the last argument will be null as it is mainly for the use of the customize dialog.

The id should match an element in the toolbar's toolbarpalette. Some special ids may also be used to create special spacing items:

lastPermanentChild    Firefox only

The last permanent child of the toolbar.

toolbarName    Firefox only

Type: boolean

Gets and sets the value of the toolbarname attribute.