Skip to content
Another Golang Tcl/Tk binding GUI ToolKit
Branch: master
Clone or download
Latest commit 572ab07 Apr 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
event add event package help Jan 28, 2018
tk macos force link 8.6 Apr 9, 2019
.gitignore x Dec 28, 2017
LICENSE Initial commit Dec 21, 2017
README.md x Apr 9, 2019

README.md

atk

Another Golang Tcl/Tk binding GUI ToolKit

go get github.com/visualfc/atk

Install Tcl/Tk

http://www.tcl-lang.org

Demo

https://github.com/visualfc/atk_demo

Sample

package main

import (
	"github.com/visualfc/atk/tk"
)

type Window struct {
	*tk.Window
}

func NewWindow() *Window {
	mw := &Window{tk.RootWindow()}
	lbl := tk.NewLabel(mw, "Hello ATK")
	btn := tk.NewButton(mw, "Quit")
	btn.OnCommand(func() {
		tk.Quit()
	})
	tk.NewVPackLayout(mw).AddWidgets(lbl, tk.NewLayoutSpacer(mw, 0, true), btn)
	mw.ResizeN(300, 200)
	return mw
}

func main() {
	tk.MainLoop(func() {
		mw := NewWindow()
		mw.SetTitle("ATK Sample")
		mw.Center()
		mw.ShowNormal()
	})
}
You can’t perform that action at this time.