Monday, November 5, 2007

A script for Creating a Window using MEL

Hi this is a small script for making a Window using MEL

global proc mywindow()
{
// The above line is a procedure, when ever you want to open the window you can call the procedure
if(`window -query -exists testWin`) deleteUI testWin;
//The above statement check that if there is a window in same name already, if it exists it will delete that.
window -title "Test Window" testWin;
//The above statement creates the window
columnLayout -adjustableColumn true;
//The above statement creates a column which is adjustable automatically
button -label "Arjun";
button -label "Blog";
button -label "CGShelf";
//The above statement creates 3 buttons with 3 different names
showWindow testWin;
//The above statement displays all the script mentioned above
}

No comments: