Go to: Synopsis. Return value. Flags. MEL examples.
 uiTemplate [-exists] 
[string]
      
uiTemplate is undoable, queryable, and editable.
This command creates a new command template object. Template objects can hold default flag arguments for multiple UI commands. The command arguments are specified with the individual commands using the -defineTemplate flag and the desired flags and arguments. See also setUITemplate.| string | The name of the uiTemplate created. | 
In query mode, return type is based on queried flag.
| Long name (short name) | Argument types | Properties | ||
|---|---|---|---|---|
| -exists(-ex) |  |   | ||
| 
 | ||||
|  Flag can appear in Create mode of command |  Flag can appear in Edit mode of command | 
|  Flag can appear in Query mode of command |  Flag can be used more than once in a command. | 
//    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;