uiTemplate [-exists]
[string]
uiTemplate は、取り消し可能、照会可能、および編集可能です。
新しいコマンド テンプレート オブジェクトを作成するためのコマンドです。テンプレート オブジェクトによって、複数の UI コマンド用にフラグの既定の引数を保持することが可能です。コマンドの引数を指定するには、個々のコマンドで -defineTemplate フラグと既定にしたいフラグと引数を使用します。setUITemplate コマンドも参照してください。| string | 作成された uiTemplate の名前。 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
-exists(-ex)
|
|
|
||
|
||||
// Create a new template.
//
if (`uiTemplate -exists ExampleTemplate`) {
deleteUI -uiTemplate ExampleTemplate;
}
uiTemplate ExampleTemplate;
button -defineTemplate ExampleTemplate
-width 100 -height 40;
frameLayout -defineTemplate ExampleTemplate
-borderVisible true -labelVisible false;
// Create a window and apply the template.
//
string $window = `window`;
setUITemplate -pushTemplate ExampleTemplate;
columnLayout -rowSpacing 5;
frameLayout;
columnLayout;
button -label "One";
button -label "Two";
button -label "Three";
setParent ..;
setParent ..;
frameLayout;
columnLayout;
button -label "Red";
button -label "Green";
button -label "Blue";
setParent ..;
setParent ..;
setUITemplate -popTemplate;
showWindow $window;