Is there a method or standard way to change the widths and heights of all Rects in a view? Let’s start with
a = Window("test", Rect(0,0,400,400)).front;
b = a.addFlowLayout(10@5, 20@5);
c = View(a, Rect(0,0,100, 100)).background_(Color.rand);
d = View(a, Rect(0,0,100, 100)).background_(Color.rand);
e = View(a, Rect(0,0,100, 100)).background_(Color.rand);
f = View(a, Rect(0,0,100, 100)).background_(Color.rand);
But say I want to make the window 300x300. Is there a way to make the contained Views 75x75 automatically? The only thing I can think of is adding a variable to multiply all widths and heights by, but that’s so much typing it seems wrong, my project has a lot more than 4 of these. Rect(0,0,100*scale,100*scale)
I was looking at setInnerExtent and similar methods, but I either misunderstood or they didn’t do what I expected. Is there something I’m missing with FlowLayout?
FlowLayout is a very old class, and is not fully supported with the newer UI widgets. It may be possible to get some resizing, but it’s likely you’ll need to hand-build this yourself.
Layouts are correct way to get this behavior - there is no equivalent to FlowLayout, but GridLayout is close.