SetHorizontalAlignment(gxui.AlignRight) ?
Daedfr opened this issue · comments
label := theme.CreateLabel()
label.SetFont(font)
label.SetText("Hello world")
label.SetHorizontalAlignment(gxui.AlignRight)
label.OnClick(func(gxui.MouseEvent) {
fmt.Printf("test")
})
The label stay on left , maybe i don't understand something ?
Hi @Daedfr,
A label's alignment is mostly used for multi-line text. If you'd like a label to be right aligned in the parent container, consider parenting label under a LinearLayout with the layout's HorizontalAlignment set to AlignRight and its SizeMode set to Fill.
I hope this helps,
Ben