I have a label and a progress bar in a GridContainer and this GridContainer is inside a HBoxContainer.
How can I vertically center all items in this GridContainer?
How can I vertically center all items in a GridContainer?
You need to set GridContainer column to 1 for it to stack vertically.
You can add spacers. Just add a control node above and below what you want to center and set them as expand fill.
This video from GDQuest might help you.
By the way, you didn't give which Godot version you're using, 3.5 and 4.0 doesn't not manage containers the same way, and AFAIK, we need to give a custom minimum size at one point because containers are unable to calculate one themselves, even and especially when they have some content which have a defined size (label or texture for instance.)
cybereality Yes this work. Thanks!