Skip to content

Instantly share code, notes, and snippets.

@napsy
Created July 3, 2010 06:43
Show Gist options
  • Save napsy/462372 to your computer and use it in GitHub Desktop.
Save napsy/462372 to your computer and use it in GitHub Desktop.
package main
import "gtk"
import "fmt"
func main() {
gtk.Init(nil)
vbox := gtk.VBox(false, 2)
window := gtk.Window(gtk.GTK_WINDOW_TOPLEVEL)
button := gtk.ButtonWithLabel("sdf")
button.Clicked(func() {
fmt.Printf("jo jo\n")
}, nil)
button2 := gtk.ButtonWithLabel("sdf")
button2.Clicked(func() {
fmt.Printf("jo jo 2\n")
}, nil)
vbox.PackStart(button, false, false, 2)
vbox.PackStart(button2, false, false, 2)
window.SetTitle("Go Gtk+ support!")
window.Add(vbox)
window.ShowAll()
gtk.Main()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment