Skip to content

How to right align inner elements in HBox?? #3189

Answered by Jacalz
cloudchamb3r asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there. You should be able to add a spacer inside the HBox like this:

btnBox := container.NewHBox(selectedLbl, layout.NewSpacer(), cancelBtn, uploadBtn)

Another option would be to use a border layout with selectedLbl in the left position and a HBox containing cancelBtn, uploadBtn in the right position. Either option should give the desired effect.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cloudchamb3r
Comment options

Answer selected by cloudchamb3r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants