widgets

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2020 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEntryWithPlaceholder

func NewEntryWithPlaceholder(text string) *widget.Entry

NewEntryWithPlaceholder makes it easy to create entry widgets with placeholders.

Types

type AdvancedEntry

type AdvancedEntry struct {
	widget.Entry

	// PressFuncfor running a function on return.
	PressFunc func()

	// Fields related to switching entry with button.
	*MoveAction
}

AdvancedEntry is used to make an entry that reacts to key presses.

func NewAdvancedEntry

func NewAdvancedEntry(placeholder string, password bool) *AdvancedEntry

NewAdvancedEntry creates an ExtendedEntry button.

func (*AdvancedEntry) InitExtend

func (a *AdvancedEntry) InitExtend(pressFunc func(), move MoveAction)

InitExtend adds extra data to the extended entry.

func (*AdvancedEntry) TypedKey

func (a *AdvancedEntry) TypedKey(ev *fyne.KeyEvent)

TypedKey handles the key presses inside our UsernameEntry and uses Action to press the linked button.

type MoveAction

type MoveAction struct {
	// Entry widgets to focus on up and down arrow keys respectively.
	UpEntry   *AdvancedEntry
	DownEntry *AdvancedEntry

	// Bools to turn  up and down of in case they are not needed.
	Up, Down bool

	// Window used for focus calls.
	Window fyne.Window
}

MoveAction handles focusing a different entry on a specific arrow key press.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL