Search code examples
gofyne

Is there a way to put an event handler on menu element?


I don't think I need these menu subitems. Can I somehow handle clicking on the menu element itself?

Something like this:

menu := fyne.NewMenu("Menu Element")
menu.Action = func() {
  ...
}

Solution

  • A menu without the popup sub-items is just a row of buttons isn’t it? It should be possible to make that with HBox and Button widgets or maybe you want a toolbar instead?