79685126

Date: 2025-06-30 17:47:57
Score: 0.5
Natty:
Report link

It works, but I do not know if it is the right solution.

func NavigationBar() *container.Scroll {
    profileButton := widget.NewButton("Profile", nil)
    profileButton.Alignment = widget.ButtonAlignLeading

    messengerButton := widget.NewButton("Messenger", nil)
    messengerButton.Alignment = widget.ButtonAlignLeading

    bigButton := widget.NewButton("Biiiiiiiiiiiiiiiiig button", nil)
    bigButton.Alignment = widget.ButtonAlignLeading

    return container.NewVScroll(container.NewVBox(profileButton, messengerButton, bigButton))
}

func main() {
    a := app.NewWithID("sac-client")
    w := windows.MasterWindow(a, false)

    nav := container.NewGridWithColumns(1, components.NavigationBar())
    label := container.NewHBox(widget.NewLabel("Test Label"))
    c := container.NewHSplit(nav, label)
    c.Offset = 0.1
    w.SetContent(c)
    a.Run()
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: leodedsec