+1 vote

Is there any way to set the size of some container children? I would like to use empty nodes as fillers or also, set the size of several buttons that get adjusted based on text size. I have used expand in the case of buttons, but I would like to know if there is other solution to this.

in Engine by (172 points)

1 Answer

+2 votes

With GUI container nodes, what you can do is change the minimum_size of children controls, and tweak their Size Flags which gives hints for some containers (like H/VBoxContainer). The other margins and rect are always overriden, but based on the former two properties.
I use "spacer" controls too sometimes, just to fill gaps and control the layout in a finer way.

by (27,902 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.