Fyne API "fyne.Menu"

fyne.Menu


import "fyne.io/fyne/v2"

Usage

type Menu

type Menu struct {
	Label string
	Items []*MenuItem
}

Menu stores the information required for a standard menu. A menu can pop down from a MainMenu or could be a pop out menu.

func NewMenu

func NewMenu(label string, items ...*MenuItem) *Menu

NewMenu creates a new menu given the specified label (to show in a MainMenu) and list of items to display.

func (*Menu) Refresh

func (m *Menu) Refresh()

Refresh will instruct this menu to update its display.

Since: 2.2