If I want a vertical column of views, with them all laid out one after the other, what’s the easiest way to do that? Simply add each one and call MoveBy to position it based on the Bounds() of the last child in the list already?
Started with a BGroupLayout but of course that stretches things, I want views all stacked and contained within a scroll view should they get too tall for the container.
Use a vertical BGroupLayout and then AddGlue() at the end to prevent stretching. AddGlue() does the opposite of what its name implies. It should be called AddSpring() but I digress. The point is that AddGlue() is what you are looking for.
I had tried a spacer but it could squash the text views I was using. I’m now using a BStringView per line (which is fine because this is for pre-formatted content though I may play some more) and the adding in a glue element worked perfectly with those.
Agree, it feels like Spring is a mutch better fit so that it gives the idea of expanding to fill the space. I didn’t see the information on glue or struts at all until I went looking through after reading jscipione’s post.