Fyne API "widget.PopUpMenu"

widget.PopUpMenu


import "fyne.io/fyne/v2/widget"

Usage

type PopUpMenu

type PopUpMenu struct {
	*Menu
}

PopUpMenu is a Menu which displays itself in an OverlayContainer.

func NewPopUpMenu

func NewPopUpMenu(menu *fyne.Menu, c fyne.Canvas) *PopUpMenu

NewPopUpMenu creates a new, reusable popup menu. You can show it using ShowAtPosition.

Since: 2.0

func (*PopUpMenu) FocusGained

func (p *PopUpMenu) FocusGained()

FocusGained is triggered when the object gained focus. For the pop-up menu it does nothing.

Implements: fyne.Focusable

func (*PopUpMenu) FocusLost

func (p *PopUpMenu) FocusLost()

FocusLost is triggered when the object lost focus. For the pop-up menu it does nothing.

Implements: fyne.Focusable

func (*PopUpMenu) Hide

func (p *PopUpMenu) Hide()

Hide hides the pop-up menu.

Implements: fyne.Widget

func (*PopUpMenu) Move

func (p *PopUpMenu) Move(pos fyne.Position)

Move moves the pop-up menu. The position is absolute because pop-up menus are shown in an overlay which covers the whole canvas.

Implements: fyne.Widget

func (*PopUpMenu) Resize

func (p *PopUpMenu) Resize(size fyne.Size)

Resize changes the size of the pop-up menu.

Implements: fyne.Widget

func (*PopUpMenu) Show

func (p *PopUpMenu) Show()

Show makes the pop-up menu visible.

Implements: fyne.Widget

func (*PopUpMenu) ShowAtPosition

func (p *PopUpMenu) ShowAtPosition(pos fyne.Position)

ShowAtPosition shows the pop-up menu at the specified position.

func (*PopUpMenu) ShowAtRelativePosition

func (p *PopUpMenu) ShowAtRelativePosition(rel fyne.Position, to fyne.CanvasObject)

ShowAtRelativePosition shows the pop-up menu at the position relative to given object.

Since 2.4

func (*PopUpMenu) TypedKey

func (p *PopUpMenu) TypedKey(e *fyne.KeyEvent)

TypedKey handles key events. It allows keyboard control of the pop-up menu.

Implements: fyne.Focusable

func (*PopUpMenu) TypedRune

func (p *PopUpMenu) TypedRune(rune)

TypedRune handles text events. For pop-up menus this does nothing.

Implements: fyne.Focusable