Mel - Maya Embedded Language

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

Some attributes:

-bgc/backgroundColor float float float
    takes a number between 0 and 1
-cw/columnWidth int
-rs/rowSpacing int
-cat/columnAttach string int
    offsets and aligns the items - values for the string: "left" | "right" | "both"
    the int is the offset from the side.
//create a window with a column of buttons.

if (`window -exists firstwindow`)
deleteUI firstwindow;
windowPref -remove firstwindow;

window  -widthHeight 150 200 firstwindow;
	-columnWidth 140
	-rowSpacing 5
	-columnAttach "both" 5;

button -width 100 -label "A";
button -width 100 -label "B";
button -width 100 -label "C";
button -width 100 -label "D";
button -width 100 -label "E";
button -width 100 -label "F";

showWindow firstwindow;
Exercise: Make a window with 3 buttons in a single column. The buttons should be aligned to the left and offset by 20 pixels. Label them "Good", "Better", "Best". Change the background color to blue and set the rowspacing to 10.