ジャンプ先: 概要. 戻り値. フラグ. MEL 例.
layoutDialog [-backgroundColor float float float] [-dismiss string] [-parent string] [-title string] [-uiScript script]
layoutDialog は、取り消し可能、照会不可能、および編集不可能です。
layoutDialog コマンドは、100 個のディビジョンがある formLayout を含むモーダル ダイアログを作成します。formLayout は、「-ui/-uiScript」フラグを使用して任意の UI 要素で埋めることができます。
注:
layoutDialog はウィンドウではないため、一部の UI 要素はダイアログ内で適切に機能しません。特に、menuBars と menuBars を含むパネルは layoutDialog と一緒に使用しないでください。
| string | -dismiss フラグで指定した文字列、またはダイアログが閉じた場合は「dismiss」。 |
backgroundColor, dismiss, parent, title, uiScript
| ロング ネーム(ショート ネーム) |
引数タイプ |
プロパティ |
|
-backgroundColor(-bgc)
|
float float float
|
|
|
ダイアログのバックグラウンド カラーです。引数は、赤、緑、青のカラー成分に対応しています。それぞれの成分の値は、0.0~1.0 です。(Windows のみのフラグです)。
|
|
-dismiss(-dis)
|
string
|
|
|
現在の layoutDialog を終了します。指定した文字列は、最初の layoutDialog コマンドの結果として設定されます。
|
|
-parent(-p)
|
string
|
|
|
ダイアログの親ウィンドウを指定します。ダイアログは親ウィンドウの中央に配置され、親ウィンドウの動きにつれて上下します。既定では、ダイアログは特定のウィンドウにはペアレント化されておらず、画面の中央に配置されます。
|
|
-title(-t)
|
string
|
|
|
|
-uiScript(-ui)
|
script
|
|
|
layoutDialog の UI を構築するために、指定した MEL プロシージャ名を使用します。このフラグは、layoutDialog を作成するときに必要です。layoutDialog の最上位コントロールは、100 個のディビジョンがある formLayout です。formLayout には、指定した MEL プロシージャの先頭で「setParent -q」をコールすることによりアクセスできます。
|
|
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
コマンド内でフラグを複数回使用できます。
|
global proc checkboxPrompt()
{
// Get the dialog's formLayout.
//
string $form = `setParent -q`;
// layoutDialog's are not resizable, so hard code a size here,
// to make sure all UI elements are visible.
//
formLayout -e -width 300 $form;
string $t = `text -l "What do you want to do?"`;
string $b1 = `button -l "Abort" -c "layoutDialog -dismiss \"Abort\""`;
string $b2 = `button -l "Skip" -c "layoutDialog -dismiss \"Skip\""`;
string $b3 = `button -l "Continue" -c "layoutDialog -dismiss \"Continue\""`;
string $cb1 = `checkBox -label "Remember my choice"`;
int $spacer = 5;
int $top = 5;
int $edge = 5;
formLayout -edit
-attachForm $t "top" $top
-attachForm $t "left" $edge
-attachNone $t "bottom"
-attachForm $t "right" $edge
-attachControl $b1 "top" $spacer $t
-attachForm $b1 "left" $edge
-attachNone $b1 "bottom"
-attachPosition $b1 "right" $spacer 33
-attachControl $b2 "top" $spacer $t
-attachPosition $b2 "left" $spacer 33
-attachNone $b2 "bottom"
-attachPosition $b2 "right" $spacer 66
-attachControl $b3 "top" $spacer $t
-attachPosition $b3 "left" $spacer 66
-attachNone $b3 "bottom"
-attachForm $b3 "right" $edge
-attachControl $cb1 "top" $spacer $b1
-attachForm $cb1 "left" $edge
-attachForm $cb1 "bottom" $spacer
-attachNone $cb1 "right"
$form;
}
layoutDialog -ui "checkboxPrompt";