Skip to Main Content
Hands-On GUI Application Development in Go
book

Hands-On GUI Application Development in Go

by Andrew Williams
February 2019
Intermediate to advanced content levelIntermediate to advanced
450 pages
11h 59m
English
Packt Publishing
Content preview from Hands-On GUI Application Development in Go

Main email window

To load the first window of a Fyne application, we must create a new application instance using app.New(). After that, we can call the NewWindow() function on this application object. The returned fyne.Window object allows us to control the window on screen and to set its content:

import "fyne.io/fyne/app"func main() {   mailApp := app.New()   browse := mailApp.NewWindow("GoMail")   ...}

Next, we will create the required widgets for our GUI. This starts by adding the widget import line, and then we add the declarations to the main() function created previously. A toolbar is added using widget.NewToolbar() (we will add items to it later). For the email list on the left, we create a new titled group using widget.NewGroup() with ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Cross-Platform GUI Applications with Fyne

Building Cross-Platform GUI Applications with Fyne

Andrew Williams

Publisher Resources

ISBN: 9781789138412Supplemental Content