GUI programming with golang

I am using the andlabs/ui library for GUI with golang.  It's quite easy to setup on the mac and Linux. 

Video Guide

But was not that much straightforward to setup on windows.  It required the MinGW-w64 [ download from here ]. Make sure you are using the latest version of the MinGW-w64.  

Select the appropriate architecture during the installation.

Select architecture
Select architecture

After installation of the MinGW set to add the path to the bin folder of the MinGW in the PATH variable.

Set environment variableSet environment variable

Copy the code from the getting started to your favourite editor

package main
import (
func main() {
err := ui.Main(func() {
input := ui.NewEntry()
button := ui.NewButton("Click")
greeting := ui.NewLabel("")
box := ui.NewVerticalBox()
box.Append(ui.NewLabel("Label"), false)
box.Append(input, false)
box.Append(button, false)
box.Append(greeting, false)
window := ui.NewWindow("Use andlabs / Ui ", 200, 100, false)
button.OnClicked(func(*ui.Button) {
greeting.SetText("Hello, " + input.Text() + "!")
window.OnClosing(func(*ui.Window) bool {
return true
if err != nil {

Run the go get command to pull the andlabs/ui package



Popular posts from this blog

Sciter : GUI Application with Golang using HTML/CSS

setup hyperledger fabric on windows 10

Apache : setup basic auth with apache in windows