Dialog

This element should be used in place of the window element for dialog boxes. The buttons attribute may be used to set which buttons should appear in the dialog box. These buttons will be placed in the correct locations for the user's platform.

More information about dialog

ダイアログボックスの場合は window 要素の代わりにこの要素を利用する必要がある。 buttons 属性を利用してどのボタンがダイアログボックスに表示されるかを指定することができる。これらのボタンは利用者のプラットフォームにしたがった適切な位置に表示される。

dialog の追加情報


属性:

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

buttonalign

Type: string

The value of the 'align' attribute for the box containing the buttons.

型 : 文字列

ボタンを含むボックス用の 'align' 属性の値。

buttondir

Type: string

The value of the 'dir' attribute for the box containing the buttons.

型 : 文字列

ボタンを含むボックス用の 'dir' 属性の値。

buttonorient

Type: string

The value of the 'orient' attribute for the box containing the buttons.

型 : 文字列

ボタンを含むボックス用の 'orient' 属性の値。

buttonpack

Type: string

The value of the 'pack' attribute for the box containing the buttons.

型 : 文字列

ボタンを含むボックス用の 'pack' 属性の値。

buttons

Type: comma-separated list of the values below

A comma-separated list of buttons to appear on the dialog box. The buttons will be placed in suitable locations for the user's platform and basic event handling will be performed automatically. The following values can be used in the list:

  • accept: The OK button, which will accept the changes when pressed. This button will also be the default button.
  • cancel: The cancel button which will cancel the operation.
  • help: A help button for displaying help about the dialog.
  • disclosure: A button to show more information. This might be a button or a disclosure triangle.

型 : 以下の値をカンマで区切ったリスト

ダイアログボックスに表示するボタンをカンマで区切ったリスト。ボタンはユーザのプラットフォームに適切な位置に配置され、基本的なイベント処理が自動的に行われる。以下の値をリストに使用することができる。

  • accept: OK ボタン。押されたときに変更を受け入れる。このボタンはデフォルトボタンとされることが多い。
  • cancel: キャンセルボタン。操作をキャンセルする。
  • help: ヘルプボタン。ダイアログについてのヘルプを表示する。
  • disclosure: 詳細情報を表示するボタン。ボタンかまたは穴の空いた三角形で表示される。
ondialogaccept

Type: script code

The code in this attribute is called when the OK button is pressed, or when the acceptDialog function is called.

型 : script code

この属性のコードは、OK ボタンが押されたとき、または acceptDialog 関数が呼ばれたときに呼ばれる。

ondialogcancel

Type: script code

The code in this attribute is called when the Cancel button is pressed, or when the cancelDialog function is called.

型 : script code

この属性のコードは、Cancel ボタンが押されたとき、または cancelDialog 関数が呼ばれたときに呼ばれる。

ondialogdisclosure

Type: script code

The code in this attribute is called when the disclosure button is pressed.

型 : script code

この属性のコードは、disclosure ボタンが押されたときに呼ばれる。

ondialoghelp

Type: script code

The code in this attribute is called when the Help button is pressed.

型 : script code

この属性のコードは、Help ボタンが押されたときに呼ばれる。

title

Type: string

The text to appear on the title bar of the dialog box.

型 : 文字列

ダイアログボックスのタイトルバーに表示されるテキスト。


プロパティとメソッド:

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

acceptDialog ( )

Return Type: no return value

Accepts the dialog and closes it, similar to pressing the OK button.

戻り値の型 : 戻り値なし

OK ボタンを押したときと同様に、ダイアログを受け入れて閉じる。

buttons

Type: comma-separated list of the values below

A comma-separated list of buttons to appear on the dialog box. The buttons will be placed in suitable locations for the user's platform and basic event handling will be performed automatically. The following values can be used in the list:

  • accept: The OK button, which will accept the changes when pressed. This button will also be the default button.
  • cancel: The cancel button which will cancel the operation.
  • help: A help button for displaying help about the dialog.
  • disclosure: A button to show more information. This might be a button or a disclosure triangle.

型 : 以下の値をカンマで区切ったリスト

ダイアログボックスに表示するボタンをカンマで区切ったリスト。ボタンはユーザのプラットフォームに適切な位置に配置され、基本的なイベント処理が自動的に行われる。以下の値をリストに使用することができる。

  • accept: OK ボタン。押されたときに変更を受け入れる。このボタンはデフォルトボタンとされることが多い。
  • cancel: キャンセルボタン。操作をキャンセルする。
  • help: ヘルプボタン。ダイアログについてのヘルプを表示する。
  • disclosure: 詳細情報を表示するボタン。ボタンかまたは穴の空いた三角形で表示される。
cancelDialog ( )

Return Type: no return value

Cancels the dialog and closes it, similar to pressing the Cancel button.

戻り値の型 : 戻り値なし

Cancel ボタンを押したときと同様に、ダイアログをキャンセルして閉じる。

centerWindowOnScreen

Type: no return value

Centers the dialog on the screen.

型 : 戻り値なし

ダイアログをスクリーンの中央に表示する。

enterDefaultAlways

Type: boolean

If set to true, pressing enter will always close the dialog, no matter which element is focused. If false, pressing Enter while another button is focused will not cause the dialog to close.

型 : boolean

true に設定すると、要素にフォーカスがあるかどうかに関係なく、Enter を押すと常にダイアログが閉じられるようにする。 false に設定すると、他のボタンにフォーカスがある間は Enter を押してもダイアログは閉じられないようにする。

getButton ( type )

Return Type: button element

Returns the button element in the dialog corresponding to the given type.

戻り値の型 : button 要素

渡された型に対応するダイアログの button 要素を返す。

moveToAlertPosition

Type: no return value

Moves and resizes the dialog to a position and size suitable for an alert box.

型 : 戻り値なし

ダイアログを、アラートボックスに適した位置とサイズに移動・リサイズする。


Copyright (C) 1999 - 2004 XulPlanet.com