« XUL Reference home [ Examples | Attributes | Properties | Methods | Related ]

A box which provides scroll arrows along its edges for scrolling through the contents of the box. The user only needs to hover the mouse over the arrows to scroll the box. This element is typically used for large popup menus.

Hovering the mouse over one of the (active) arrows triggers a scroll event.

More information is available in the XUL Tutorial.

clicktoscroll, disabled, smoothscroll, tabindex
disabled, scrollBoxObject, scrollIncrement, smoothScroll, tabIndex
ensureElementIsVisible, scrollByIndex, scrollByPixels


<arrowscrollbox orient="vertical" flex="1">
  <button label="Red"/>
  <button label="Blue"/>
  <button label="Green"/>
  <button label="Yellow"/>
  <button label="Orange"/>
  <button label="Silver"/>
  <button label="Lavender"/>
  <button label="Gold"/>
  <button label="Turquoise"/>
  <button label="Peach"/>
  <button label="Maroon"/>
  <button label="Black"/>


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: boolean
clicktoscroll, if true, the arrows must be clicked to scroll the scrollbox content. If false, the mouse must be hovered over the arrows to scroll automatically.
Type: boolean
Indicates whether the element is disabled or not. If this attribute is set, the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire. In the case of form elements, it will not be submitted. Do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
The disabled attribute is allowed only for form controls. Using it with an anchor tag (an <a> link) will have no effect.
The element will, however, still respond to mouse events. To enable the element, leave this attribute out entirely.
Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state.
Type: boolean
true initially enables smooth scrolling for the corresponding arrowscrollbox, false disables it. Currently, smooth scrolling supports horizontal arrowscrollboxes only.
Type: integer
The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in the tab sequence.


Inherited Properties
align, , allowEvents, , boxObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width

Type: boolean
Gets and sets the value of the disabled attribute.
Type: nsIScrollBoxObject
The scroll box object implements the nsIScrollBoxObject interface, which may be used to retrieve and adjust the scroll position of the list box.
Type: integer
A read only property that lets you retrieve the number of pixels by which scrolling will occur when the arrowscrollbox is clicked.
Type: boolean
Can be set to enable or disable smooth scrolling for the corresponding arrowscrollbox. If not set explicitly, it will fall back to the smoothscroll attribute and then to the toolkit.scrollbox.smoothScroll preference. Currently, smooth scrolling supports horizontal arrowscrollboxes only.
Type: integer
Gets and sets the value of the tabindex attribute.


ensureElementIsVisible( element )
Return type: no return value
If the specified element is not currently visible to the user, the displayed items are scrolled so that it is. If the item is already visible, no scrolling occurs.
scrollByIndex( lines )
Return type: no return value
Scrolls the contents of the arrowscrollbox by a certain number of lines. A line is a single element. Use a positive value as the lines argument to scroll forward that many lines, or a negative value to scroll backward that many lines.
scrollByPixels( pixels )
Return type: no return value
Scrolls the contents of the arrowscrollbox by a certain number of pixels. Use a positive value as the pixels argument to scroll forward that many pixels, or a negative value to scroll backward that many pixels.

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