Or, compare (by uncommenting 3rd line) :
(
var win, parent, numChildren = 12, childClass;
childClass = GUI.compositeView;
//childClass = GUI.hLayoutView; /* all in win's left top corner */
win = GUI.window.new(nil, Rect(100, 100, 400, 300));
parent = GUI.compositeView.new(win, Rect(50, 20, 300, 200));
parent.background = Color(0.7, 0.7, 0.9);
parent.decorator = FlowLayout(parent.bounds, 20 @ 20, 10 @ 10);
parent.relativeOrigin = true; /* makes no difference here */
numChildren.do { |i| var kid;
kid = childClass.perform(\new, parent, 50 @ 40);
kid.background = Color.rand(0.1, 0.2).alpha_(0.2);
};
win.front;
)
_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://lists.create.ucsb.edu/mailman/listinfo/sc-devel