Go to: Synopsis. Return value. Flags. MEL examples.

Synopsis

setUITemplate [-popTemplate] [-pushTemplate] [string]

setUITemplate is undoable, queryable, and NOT editable.

This command sets the current(default) command template for the ELF commands. The special name NONE can be used to set no templates current. See "uiTemplate" command also.

Return value

stringThe name of the currently selected command template.

In query mode, return type is based on queried flag.

Flags

popTemplate, pushTemplate
Long name (short name) Argument types Properties
-pushTemplate(-pst) create
Push the current template onto a stack that can later be popped.
-popTemplate(-ppt) create
Pop the current template off of the stack and sets the next template on the stack to be current.

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.

MEL examples

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