移動先: 概要 戻り値 フラグ. MEL 例.

概要

layoutDialog [-backgroundColor float float float] [-dismiss string] [-parent string] [-title string] [-uiScript string]

layoutDialog は 「元に戻す」が可能、「照会」が不可能「編集」が不可能 です。

layoutDialog コマンドは、100 個のディビジョンがある formLayout を含むモデル ダイアログを作成します。formLayout は、「-ui/-uiScript」フラグを使用して任意の UI 要素で埋めることができます。

注:
layoutDialog はウィンドウではないため、一部の UI 要素はダイアログ内で適切に機能しません。特に、menuBars と menuBars を含むパネルは layoutDialog と一緒に使用しないでください。

戻り値

string-dismiss フラグで指定した文字列、またはダイアログが閉じた場合は「dismiss」。

フラグ

backgroundColor, dismiss, parent, title, uiScript
ロング ネーム(ショート ネーム) 引数型 プロパティ
-title(-t) string create
ダイアログのタイトルです。
-dismiss(-dis) string create
カレントの layoutDialog を終了します。指定した文字列は、最初の layoutDialog コマンドの結果として設定されます。
-parent(-p) string create
ダイアログの親ウィンドウを指定します。ダイアログは親ウィンドウの中央に配置され、親ウィンドウの動きにつれて上下します。 デフォルトでは、ダイアログは特定のウィンドウにはペアレント化されておらず、画面の中央に配置されます。
-backgroundColor(-bgc) float float float create
ダイアログのバックグラウンド カラーです。引数は、赤、緑、青のカラー成分に対応しています。それぞれの成分の値は、0.0~1.0 です(Windows のみのフラグです)。
-uiScript(-ui) string create
layoutDialog の UI を構築するために、指定した MEL プロシージャ名を使用します。このフラグは、layoutDialog を作成するときに必要です。 layoutDialog の最上位コントロールは、100 個のディビジョンがある formLayout です。formLayout には、指定した MEL プロシージャの先頭で「setParent -q」を呼び出すことによりアクセスできます。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : 1 つのコマンドで複数回使用可能なフラグ

MEL 例

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";