How to add buttons under a ScrollContainer?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By d6ta

I have 2 buttons for my idle clicker game, and I plan to add more buttons, and eventually I’ll need to be able to scroll down to find more buttons. I’ve tried parenting the buttons under a ScrollContainer, adding VScrollBars, etc. etc. and it either makes my buttons overlap each other and positions off, or totally breaks the buttons to where they don’t respond to clicks.

Here’s how my Nodes are laid out:

Thank you for the help!

:bust_in_silhouette: Reply From: exuin

I put the buttons in a gridcontainer inside a scrollcontainer.example image

I did have to resize the ScrollContainer to make it bigger, though.

It partially worked, although the buttons still overlapped a little bit, and some of the labels parented inside of the buttons were moved away from the button, and I couldn’t move them because “positions of children of scrollcontainers are determined by the scrollcontainer properties”.

d6ta | 2020-09-18 00:22

I put the buttons and their labels into vboxcontainers.example image

If you want the label below the buttons, change their order in the vboxcontainer.

exuin | 2020-09-18 00:40

:bust_in_silhouette: Reply From: rakkarage

when you make an empty scroll container it shows a warning that says to make a hbox or vbox or grid or something and let that deal with children
worked for me like that