Use the gridLayout to add your command in a grid fashion across your window.
-gridlayout
// create a window with a gridded button structure
// buttons report back to the user which button they pressed through the proc what().
proc what(int $num)
{
string $mybutton[] = {"one","two","three","four","five","six"};
print ("\nYou thought you would get away with pressing button "+ $mybutton[$num -1]);
}
if (`window -exists ted`)
{
deleteUI ted;
windowPref -remove ted;
}
window -widthHeight 234 70 ted;
gridLayout
-numberOfRowsColumns 2 3
-cellWidthHeight 75 20;
button -label "b1" -command "what(1);";
button -label "b2" -command "what(2);";
button -label "b3" -command "what(3);";
button -label "b4" -command "what(4);";
button -label "b5" -command "what(5);";
button -label "b6" -command "what(6);" lastButton;
showWindow ted;
|