The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+1 vote

I have a WindowDialog with a few buttons in a VBoxContainer. There are expandable separators between buttons, so the container is resized along with the window.

the problem is, I can resize the window below the minimal size of the container, and the buttons are "hovering in the air".

I know there is "Min Size" for the window, but that's a poor solution - what is I want to add more buttons and forget to change it? Or add them in runtime.

Is it possible to set "do not resize the window below the size of its children"? Or at least get the container's current minimal size - not the specified "Min Size", which is (0,0) , but the actual current (runtime) minimal size, below which it can not resize because of the buttons on it.

in Engine by (19 points)

There's probably a way to do it automatically that I don't know about, but what you could do is have a script that runs after the game has launched and all buttons have been instanced, that measures the min size the window needs to be by looking at the dimensions of all its children, and sets Min Size based on that

I have exactly the same issue, have you found a solution? Looking for a clean answer

Please log in or register to answer this question.

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 Frequently asked questions and 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 [email protected] with your username.