MEL ウインドウを作成

//同じウインドウがある場合削除します。testは作成ウインドウ毎に変更してください。
if(`window -exists test`)
deleteUI test;


//150縦120のサイズにする為ウインドウを作成
window -widthHeight 150 120 test;
deleteUI -window test;
windowPref -remove test;


//バーの名前が「ウインドウ」のウインドウを作成
string $window = `window -title "ウインドウ" test `;


//縦にボタンを並べる ボタンのサイズはウインドウの幅で作成する
columnLayout -adjustableColumn true;


//文字作成 文字は\nを入力すると改行できる。
text -label "文字" -align "left";


//ボタン作成1 -command "";等の"と"の間に、polyCube;等コマンドを入力。
button -command "" -h 16 -label " button1";


//ボタン作成2 -command "";等の"と"の間に、コマンドを入力。
button -command "" -h 16 -label " button2";


//チェックボタン
checkBox -label "チェックボタン" -offCommand "" -onCommand "" -align "center";


//横線
separator;


//ボタン列数を変更等に必要。まとめる。
setParent ..;


//横にボタンを並べる 例2個 幅75 高さ20
gridLayout -numberOfColumns 2 -cellWidth 75 -cellHeight 20;
button -label "B1" -command "";
button -label "B2" -command "";
setParent ..;


//作成したウインドウを表示
showWindow $window;