andlabs-ui/examples/basicwindow/basicwindow.go

32 lines
369 B
Go
Raw Normal View History

2014-11-25 17:35:17 -06:00
package main
import (
"github.com/andlabs/ui"
"log"
)
func main() {
go ui.Do(gui)
err := ui.Go()
if err != nil {
log.Print(err)
}
}
func gui() {
// Here we create a new space
newControl := ui.Space()
// Then we create a window
w := ui.NewWindow("Window", 280, 350, newControl)
w.OnClosing(func() bool {
ui.Stop()
return true
})
w.Show()
}