Listitem

A single row in a list box. The text of the listitem is specified either using listcell elements, or by placing a label attribute directly on the listitem element. You may also place other elements inside the listitem for more complex content.

More information about listitem

リストボックスにおける一つの行。 listitem 要素のテキストは、 listcell 要素を利用するか、あるいは listitem 要素に直接 label 属性をあてがうことにより指定する。より複雑な内容のために、他の要素を listitem 要素内に置くこともできる。

listitem の追加情報

属性:

accesskey checked command crop current
disabled image label selected type
value

スタイルクラス:

listitem-iconic

プロパティとメソッド:

accessKey accessible checked control crop
current disabled image label selected
value

属性:

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
mousethrough
observes
ordinal
orient
pack
persist
popup
position
ref
removeelement
sortDirection
sortResource
sortResource2
statustext
style
template
tooltip
tooltiptext
top
uri
wait-cursor
width

accesskey

Type: character

This should be set to a letter that is used as a shortcut key. This letter should be one of the characters that appears in the label text for the listitem. This letter will typically be drawn underlined, although this behavior will be platform and theme specific. When the user presses ALT (or a similar key that varies on each platform) and the access key, the listitem will be activated from anywhere in the window. Although the value is case insensitive, a letter with the case matching the accesskey attribute will used if both cases exist in the label.

型 : character

ショートカットキーとして使う文字に設定する。この文字は、listitem のラベルテキストに現れる文字の一つである必要がある。この文字は一般に下線付きで表示される。一方、その振る舞いはプロットフォームやテーマに依存する。ユーザが ALT (またはプラットフォームによる同様のキー) とアクセスキーを押すと、ウィンドウのどこからでも listitem は起動される。この値は文字の大小には関しないが、ラベルに両方がある場合には、 accesskey 属性にマッチする方の文字が使用される。

checked

Type: boolean

Indicates whether the listitem is checked or not.

型 : boolean

listitem がチェックされているかどうかを表す。

command

Type: element id

Set to an id of a command element that is being observed by the element.

型 : 要素 id

要素が監視している command 要素の id を設定。

crop

Type: one of the values below

If the label of the listitem is too small to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be used in place of the cropped text. If the box direction is reversed, the cropping is reversed.

  • start: The text will be cropped on its left side.
  • end: The text will be cropped on its right side.
  • left: (Deprecated) The text will be cropped on its left side.
  • right: (Deprecated) The text will be cropped on its right side.
  • center: The text will be cropped on both sides.
  • none: The text will be not be cropped using an ellipsis. However, the text will simply be cut off if it is too large. The side depends on the CSS text alignment.

型 : 以下の値の一つ

与えられたスペースが小さくて listitem のラベルがその場所に合わないとき、crop 属性で指定した側にテキストは切り取られる。切り取られたテキストの位置には、省略記号が用いられる。ボックスの方向が逆のときは、切り取りも逆になる。

  • start: テキストの左側が切り取られる。
  • end: テキストの右側が切り取られる。
  • left: (非推奨) テキストの左側が切り取られる。
  • right: (非推奨) テキストの右側が切り取られる。
  • center: テキストの両側が切り取られる。
  • none: テキストの切り取りに省略記号が用いられない。テキストが非常に大きいときには、単に切られるだけである。側は CSS のテキスト配置 (alignment) に依存する。
current

Type: boolean

This attribute will be set to true if the listitem is the current item. This is typically used by a theme to customize the focus ring. To change the currently selected item in a listbox, use the listbox property selectedItem.

型 : boolean

この listitem がカレントの項目であるとき、この属性は true に設定される。フォーカスリングをカスタマイズするために、一般にテーマで使用される。リストボックスの現在選択している項目を変更するには、 listbox のプロパティ selectedItem を使用する。

disabled

Type: boolean

Indicates whether the listitem is disabled or not. If this attribute is set to true, the listitem is disabled. This is usually drawn with the text in grey. If the listitem is disabled, it does not respond to user actions. The element cannot be focused and the command event will not fire. The element will still respond to mouse events. To enable the listitem, leave the attribute out entirely as opposed to setting the value to false.

型 : boolean

listitem が無効か有効かを表す。この属性を true に設定すると、listitem は無効になる。通常、テキストが灰色で表示される。listitem が無効の場合には、ユーザアクションに応答しない。要素にフォーカスできず、またコマンドイベントは起きない。マウスイベントにはまだ応答する。listitem を有効にするには、値を false に設定したことに対応するものとして、この属性を取り除く。

image

Type: image URL

The URL of the image to appear on the listitem. If this is attribute is left out, no image appears. The position of the image is determined by the dir and orient attributes. You must use the class 'listitem-iconic' to have an image appear.

型 : image URL

listitem に表示する画像の URL。この属性がないと、画像は表示されない。画像の位置は dir 属性と orient 属性で決定される。表示画像を持つ 'listitem-iconic' クラスを使う必要がある。

label

Type: string

The label that will appear on the listitem. If this is left out, no text appears.

型 : string

listitem に表示するラベル。この属性がないと、テキストは表示されない。

selected

Type: boolean

Indicates whether the listitem is selected or not. This property is read only. To change the selection, set either the selectedIndex or selectedItem property of the containing listbox.

型 : boolean

listitem が選択されているかどうかを示す。このプロパティは読み込み専用である。選択を変更するには、この要素を含む listbox の selectedIndex プロパティか selectedItem プロパティを設定する。

type

Type: string

You can make an item in a listbox a checkbox by setting this attribute to the value 'checkbox'.

型 : string

この属性の値を 'checkbox' に設定すると、リストボックスの項目をチェックボックスにすることができる。

value

Type: string

A value associated with the listitem. You may use it in a script for your own purposes.

型 : string

listitem に関連する値。目的に応じてスクリプトで使うことができる。


Style Classes:

The following classes may be used to style the element. These classes should be used instead of changing the style of the element directly since they will fit more naturally with the user's selected theme.

以下のクラスは、要素をスタイル付けするために用いられる。ユーザが選択したテーマにより自然に合うため、要素のスタイルを直接変更するかわりにこれらのクラスを使用するべきである。

listitem-iconic

Use this class to have an image appear on the listitem. Specify the image using the image attribute.

listitem に表示される画像を保持するのにこのクラスを使う。 image 属性を使って画像を指定する。


プロパティとメソッド:

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

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

accessKey

Gets and sets the value of the accesskey attribute.

accesskey 属性の値を取得・設定する。

accessible

Type: nsIAccessible

Returns the accessibility object for the listitem.

型 : nsIAccessible

listitem の accessibility オブジェクトを返す。

checked

Type: boolean

For checkbox type listitems, indicates whether the listitem is checked or not. You can change the checked property to change the state of the listitem. A CheckboxStateChange event will be sent to the listitem when it is changed either via the checked property or changed by the user.

型 : boolean

チェックボックス型のリスト項目について、その listitem がチェックされているかされていないかを示す。checked プロパティを変更することで、listitem の状態を変更することができる。checked プロパティで変更される、またはユーザにより変更されると、 CheckboxStateChange イベントが listitem に送信される。

control

Type: listbox element

A reference to the listitem's containing listbox.

型 : listbox element

この listitem を含む listbox への参照。

crop

Type: string

Gets and sets the value of the crop attribute.

型 : string

crop 属性の値を取得・設定する。

current

Type: boolean

Gets and sets the value of the current attribute.

型 : boolean

current 属性の値を取得・設定する。

disabled

Type: boolean

Gets and sets the value of the disabled attribute.

型 : boolean

disabled 属性の値を取得・設定する。

image

Type: image URL

Gets and sets the value of the image attribute.

型 : image URL

image 属性の値を取得・設定する。

label

Type: string

Gets and sets the value of the label attribute.

型 : string

label 属性の値を取得・設定する。

selected

Type: boolean

Gets and sets the value of the selected attribute.

型 : boolean

selected 属性の値を取得・設定する。

value

Type: string

Gets and sets the value of the value attribute.

型 : string

value 属性の値を取得・設定する。


Copyright (C) 1999 - 2004 XulPlanet.com