dynamically increase the height of a scroll box based on child count?

Hi,

I have a UI which I want to become a giant scroll box for all the buttons that get added. I want these buttons uniformly spaced vertically in screen space.

Currently my (at runtime) populated uniform grid panel is what I am using to store my buttons. I wanted to organise them in this panel so I can query the screen space positions later.

And then outside of this I have my scroll box that fills the screen.

when I run currently - the buttons will fill out the rows of the uniform grid panel

but are squished into the panel dimensions. What I want to achieve is have a specific vertical gap between buttons. And as the buttons overflow the bottom of the screen have the bottom of the grid panel extended downward so it uses the scroll box somehow to scroll downward.

I know that if I just add directly to scroll box I can get what I want, but I then will lose the layout of my other widget elements and cant easily query slot positions etc.

any advice, much appreciated.
thanks

:frowning: no one…