Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

toolbar

보통 한 줄로 된 버튼들을 포함하는 컨테이너로 기본적으로 내부 요소가 수평으로 나열되는 상자의 한 유형입니다. toolbartoolbox 내에 위치할 경우 grippy를 이용하여 접혀질 수 있습니다. 툴바는 항상 id 속성을 가져야 합니다. Firefox에서는 사용자 지정 툴바(도구 모음)를 지원하지만, Mozilla 브라우저는 지원하지 않습니다.

좀 더 자세한 사항은 XUL tutorial를 참조하세요.

Attributes
currentset, customindex, customizable, defaultset, grippyhidden, grippytooltiptext, mode, toolbarname
Properties
accesible, currentSet, firstPermanentChild, lastPermanentChild, toolbarName
Methods
insertItem

예제

Image:XUL_ref_toolbar.png
<toolbox>
  <toolbar id="nav-toolbar">
    <toolbarbutton id="nav-users"  accesskey="U" label="Users"/>
    <toolbarbutton id="nav-groups" accesskey="p" label="Groups"/>
    <toolbarbutton id="nav-events" accesskey="E" label="Events" disabled="true"/>
  </toolbar>
</toolbox>

Attributes

currentset
Firefox only
타입: comma-separated string
현재 toolbar에 출력되는 항목의 집합입니다. 이 집합은 사용자가 툴바를 커스터마이징(사용자 지정) 할 경우 변경될 수 있습니다. 속성값은 쉼표(,)로 분리된 toolbarpalette에 있는 항목들의 ID 목록이어야 하며, 추가적으로 "separator", "spring", "spacer"의 문자열을 포함할 수 있습니다.

this isn't necessary the *current* set, i.e. it might not be equal the value of the currentSet property which is computed from the actual DOM

customindex
Not in SeaMonkey 1.x
Type: integer
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
Not in SeaMonkey 1.x
Type: boolean
Set this attribute to true on toolbars that can be customized. This causes the set of buttons to be persisted across sessions.
defaultset
Not in SeaMonkey 1.x
Type: comma-separated list of item ids
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
SeaMonkey only
Type: boolean
When set to true, the grippy will be hidden. When set to false, the default, the grippy will be shown.
grippytooltiptext
SeaMonkey only
Type: string
The text to appear on the tooltip for the toolbar's grippy when the toolbar is collapsed. This would be used to label the grippy so that the user knows which toolbar it represents.
mode
Not in SeaMonkey 1.x
Type: one of the values below
How the toolbarbuttons on the toolbar are displayed.
icons
Show only icons.
text
Show only text.
full
Show both.
toolbarname
Not in SeaMonkey 1.x
Type: string
The name of the toolbar, which is listed on the Show/Hide toolbars menu.

Properties

accessible
Type: nsIAccessible
Returns the accessibility object for the element.
currentSet
Not in SeaMonkey 1.x
Type: comma-separated list of strings
Holds a comma-separated list of the IDs of the items currently on the toolbar. For spacers, separators, and flexible spacers the following strings are used instead of IDs: "spacer", "separator", "spring". An empty toolbar has a currentSet value of "__empty".
You may change the current set of items by setting this property. Be careful, as setting this property doesn't automatically update the currentset attribute.

 

firstPermanentChild
Not in SeaMonkey 1.x
Type: element
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.
lastPermanentChild
Not in SeaMonkey 1.x
Type: element
The last 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.
toolbarName
Not in SeaMonkey 1.x
Type: string
The name of the toolbar.

Methods

insertItem( id, beforeNode, wrapper, beforePermanent )
Not in SeaMonkey 1.x
Return type: element
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:

  • separator: A separator, which is drawn as a vertical bar.
  • spacer: A non-flexible space.
  • spring: A flexible space.

The method returns the DOM element for the created item.

 

XUL 요소에서 상속됨
blur, click, doCommand, focus, getElementsByAttribute

DOM 요소에서 상속됨
addEventListener(), appendChild(), dispatchEvent(), getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getElementsByTagName(), getElementsByTagNameNS(), hasAttribute(), hasAttributeNS(), hasAttributes(), hasChildNodes(), insertBefore(), isSupported(), normalize(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), removeChild(), removeEventListener(), replaceChild(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS()

Elements
toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox
Interfaces
nsIAccessibleProvider

문서 태그 및 공헌자

 이 페이지의 공헌자: teoli, Suguni
 최종 변경: teoli,