Control node's size flags not working?

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

I have a center container, inside which is a VBoxContainer, inside which are buttons.

When I try to apply the “expand” size flag to either the VBoxContainer or the buttons, nothing happens. I want the buttons to stretch to the width of their container.

:bust_in_silhouette: Reply From: exuin

Hi, if you check the docs for CenterContainer, it says

This container keeps all children to their minimum size, in the center.

This means that size flags are useless. You need to set the rect_min_size.

Ah, didn’t notice that part in the docs. Thanks!

JorensM | 2021-09-13 17:16