How to right align inner elements in HBox?? #3189
-
func createLocalToNetworkContainer() *fyne.Container {
fileTree := createFileTree("~")
selectedLbl := widget.NewLabel("Selected : 0")
cancelBtn := widget.NewButton("Cancel", nil)
uploadBtn := widget.NewButton("Upload", nil)
btnBox := container.NewHBox(selectedLbl, cancelBtn, uploadBtn)
c := container.NewBorder(nil, btnBox, nil, nil, fileTree)
return c
} i'm new to fyne gui framework and i'm trying to implement simple view for my project. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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 |
Beta Was this translation helpful? Give feedback.
Hi there. You should be able to add a spacer inside the HBox like this:
Another option would be to use a border layout with
selectedLbl
in the left position and a HBox containingcancelBtn, uploadBtn
in the right position. Either option should give the desired effect.