Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On GUI Application Development in Go

You're reading from   Hands-On GUI Application Development in Go Build responsive, cross-platform, graphical applications with the Go programming language

Arrow left icon
Product type Paperback
Published in Feb 2019
Publisher Packt
ISBN-13 9781789138412
Length 450 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Andrew Williams Andrew Williams
Author Profile Icon Andrew Williams
Andrew Williams
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Section 1: Graphical User Interface Development FREE CHAPTER
2. The Benefits of Native Graphical Applications 3. Graphical User Interface Challenges 4. Go to the Rescue! 5. Section 2: Toolkits Using Existing Widgets
6. Walk - Building Graphical Windows Applications 7. andlabs UI - Cross-platform Native UIs 8. Go-GTK - Multiple Platforms with GTK 9. Go-Qt - Multiple Platforms with Qt 10. Section 3: Modern Graphical Toolkits
11. Shiny - Experimental Go GUI API 12. nk - Nuklear for Go 13. Fyne - Material Design-Based GUI 14. Section 4: Growing and Distributing Your Application
15. Navigation and Multiple Windows 16. Concurrency, Networking, and Cloud Services 17. Best Practices in Go GUI Development 18. Distributing Your Application 19. Installation Details 20. Cross Compiler Setup 21. Comparison of GUI Toolkits
22. Connecting GoMail to a Real Email Server 23. Other Books You May Enjoy

Getting started continued

Now that we have explored a little of how Shiny is designed and its current constraints, we can implement our first graphical application and see it run.

Code

Let's get started with writing a simple hello world window, as in the previous chapters. This code is a little more complicated than in previous examples due to the low-level nature of the toolkit at this time. As well as defining the window, label, and button, we will need to set up a background layer and measure the minimum size for the containing window:

package main

import (
"golang.org/x/exp/shiny/driver"
"golang.org/x/exp/shiny/screen"
"golang.org/x/exp/shiny/widget"
"golang.org/x/exp/shiny...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime