Mel - Maya Embedded Language

Use rowLayout to organize your information in rows.

-rowlayouts
Use columnLayout to lay out the items in your window in a single column.

Some attributes:

-nc/numberOfColumns
-bgc/backgroundColor float float float
    takes a number between 0 and 1
-cw/columnWidth int int
    the first number is the number of the column and the second is the width
-cw1/columnWidth1 int
-cw2/columnWidth2 int int
-cw3/columnWidth3 int int int
-cw4/columnWidth4 int int int int
-cw5/columnWidth5 int int int int int
-cw6/columnWidth6 int int int int int int
-cat/columnAttach int string int
-ct1/columnAttach1 string
    Valid values are "left", "right", and "both"
-ct2/columnAttach2 string string
-ct3/columnAttach3 string string string
-ct4/columnAttach4 string string string string
-ct5/columnAttach5 string string string string string
-ct6/columnAttach6 string string string string string string
-cl/columnAlign int string
    int is the column Num. Text alignment. Valid values are "left", "right", and "center".
-cl1/columnAlign1 string
    Text alignment for the first column. Valid values are "left", "right", and "center".
-cl2/columnAlign2 string string
-cl3/columnAlign3 string string string
-cl4/columnAlign4 string string string string
-cl5/columnAlign5 string string string string string
-cl6/columnAlign6 string string string string string string
...many more - check the help menu
****************************************************************************
//create three rows of buttons
//attach the first button to the left 0 pixels
//attach the last button to the right 0 pixels
//attach the middle button to the center


if (`window -exists bob`)
	{
	deleteUI bob;
	windowPref -remove bob;
	}
	
window -widthHeight 310 50 bob;
			
rowLayout 	
	-numberOfColumns 3
	-columnWidth3 100 100 100
	-columnAttach 1 "left" 0
	-columnAttach 2 "both" 0
	-columnAttach 3 "right" 0;
	
button -label "sphere" -width 100 -command "sphere -radius 1 -axis 0 90 0";
button -label "cube" -width 100 -command "polyCube -width 1 -height 1 -depth 1";
button -label "plane" -width 100 -command "plane -rotation 90 0 0 -width 1 -length 1";

showWindow bob;
Exercise: Try to create a wondow that looks like the following: