February 2019
Intermediate to advanced
450 pages
11h 59m
English
The basic Hello World application with Fyne is quite succinct, as the application setup is encapsulated in a single call. The entry point, app.New(), provided by the app sub-package, sets up a new application that we use to open a new window. The widget sub-package defines the various widgets available that we can add to our new window:
package mainimport "fyne.io/fyne/app"import "fyne.io/fyne/widget"func main() { app := app.New() win := app.NewWindow("Hello World") win.SetContent(widget.NewVBox( widget.NewLabel("Hello World!"), widget.NewButton("Quit", func() { app.Quit() }), )) win.ShowAndRun()}
As you can see in the preceding code block, the newly created fyne.Window has its content set to a new widget.VBox that provides the basic ...
Read now
Unlock full access