+1 vote

I don't know how to do it.

in Engine by (399 points)

1 Answer

+1 vote

Alignment can be set to "End" which will make the container start from the right. Make the label the last (bottom) child of the container.

In addition, if you set the label's Size Flags to "Expand" it will push any other controls to the left.

by (21,940 points)

Using the Expand approach worked for me.

I have multiple elements on the left side and one on the right side. The elements are inside a HBox and then a Control in between. The Control node is empty but has Size Flags Horizontal set to Expand.

-- HBoxContainerLeft
---- Label
---- TextureRect
-- Control
-- HBoxContainerRight
---- Label

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.