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 ...

Get Hands-On GUI Application Development in Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.