Visit Mozilla.org

XUL:arrowscrollbox

出典: MDC

« XUL リファレンス HOME    [ | 属性 | プロパティ | メソッド | 関連項目 ]

コンテンツをスクロールするためのスクロールアロー(矢印) を端に持ったボックスです。ユーザは矢印にマウスを重ねるだけでボックスをスクロールさせることができます。この要素は、大きなポップアップメニューで一般的に使用されています。

詳しい情報は XUL チュートリアルにあります。

属性
disabled, smoothscroll, tabindex
プロパティ
disabled, scrollBoxObject, scrollIncrement, smoothScroll, tabIndex
メソッド
ensureElementIsVisible, scrollByIndex, scrollByPixels

[編集]

Image:menuscroll1.jpg
<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"/>
</arrowscrollbox>

[編集] 属性

XUL 要素からの継承
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

disabled
型: 真偽値
要素が無効化されているかどうかを示します。ある要素が true に設定されていたら、その要素は無効化されています。無効化された要素は通常グレイ表示のテキストで描画されます。要素が無効化されていると、ユーザのアクションには応答せず、フォーカスもあてられず、command イベントも発生しません。

smoothscroll Firefox 3 の新機能
型: boolean
初期値の true の場合、対応する arrowscrollbox のスムーズスクロールを有効にします。false の場合はそれを無効にします。現在のスムーズスクロールは垂直方向の arrowscrollbox のみをサポートしています。

tabindex
型: 整数
要素のタブの順番。タブの順番は tab キーが押下されたときにフォーカスが移動する順番です。より大きな tabindex の値をもつ要素は、タブの遷移が後になります。

[編集] プロパティ

XUL 要素からの継承
align, allowEvents, boxObject, builder, className, collapsed, contextMenu, controllers, currentItem, database, datasources, dir, flex, height, hidden, id, left, listBoxObject, maxHeight, maxWidth, menu, minHeight, minWidth, observes, ordinal, orient, pack, persist, ref, resource, statusText, style, tooltip, tooltipText, top, value, width

DOM 要素からの継承
attributes, childNodes, cloneNode, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, tagName

disabled
型: 真偽値
disabled 属性の値の取得と設定。

scrollBoxObject
型: nsIScrollBoxObject
scroll box オブジェクトは、list box のスクロール位置の変更や取得に使用される nsIScrollBoxObject インタフェースを実装します。

scrollIncrement
型: integer
arrowscrollbox がクリックされた時に発生するスクロールのピクセル数を取得する、読み取り専用のプロパティ。

smoothScroll Firefox 3 の新機能
型: boolean
対応する arrowscrollbox のスムーズスクロールを有効または無効に設定します。明示的に設定されていないときは smoothscroll 属性にフォールバックされ、次に toolkit.scrollbox.smoothScroll 設定にフォールバックされます。現在のスムーズスクロールは垂直方向の arrowscrollbox のみをサポートしています。

tabIndex
型: 整数
tabindex 属性の値の取得と設定。

[編集] メソッド

ensureElementIsVisible( element )
戻り値の型: 戻り値なし
指定した要素がユーザに見えていないときは、表示されている項目がスクロールされ、見えるようになります。項目がすでに見える位置にあるときはスクロールされません。

scrollByIndex( lines )
戻り値の型: 戻り値なし
arrowscrollbox のコンテンツを lines に与えられた行数だけスクロールします。一行は一つの要素です。多くの行数を先方にスクロールするには lines 引数に正の値を、後方にスクロールするには負の値を使用してください。

scrollByPixels( pixels )
戻り値の型: 戻り値なし
arrowscrollbox のコンテンツを pixels に与えられたピクセル数だけスクロールします。多くのピクセル数を先方にスクロールするには pixels 引数に正の値を、後方にスクロールするには負の値を使用してください。

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

[編集] 関連項目

TBD