«growing layout» by julian.rohrhuber
on 01 Oct'16 11:10 inJust an illustration of how layouts behave dynamically.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
( a = Window(); a.layout = v = VLayout(); a.front; fork({ 10.do { v.add(h = HLayout()); 20.rand.do { h.add(Slider()); 0.1.wait; }; 1.wait; }; }, AppClock) ) ( a = Window(); a.layout = v = VLayout(); a.front; fork({ var or; 10.do { or = [\horizontal, \vertical].choose; v.add(h = HLayout()); 10.rand.do { h.add(Slider().orientation_(or).value_(1.0.rand)); 0.1.wait; }; 1.wait; }; }, AppClock) )
reception
this is just what i was looking for, thanks! and it's a bit hypnotic, especially when the window size adjusts itself. i always look forward to that part