[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Sc-devel] bugs in SCxxxLayoutView



There are real problems with SCxxxLayoutView.

E.G. the "elastic" example in SCHLayoutView help file works, but the background color is _not_ elastic.

(B.T.W. would be nice to have an 'onResize' action function, sometimes)


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;
)