Skip to content

visualfc/atk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atk

Another Golang Tcl/Tk binding GUI ToolKit

go get github.com/visualfc/atk

Go docs: https://pkg.go.dev/github.com/visualfc/atk/tk

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(nil)
		mw.ShowNormal()
	})
}

About

Another Golang Tcl/Tk binding GUI ToolKit

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages