Source

ttgui / test.py

Full commit
from tcore import TPoint, TSize
from tgui import TApplication
from tgui import TCheckBox, TPushButton
from tgui import TLabel, TLineEdit, TMenu
from tgui import TWidget


def test():
	l.setText("clicked!")


def exit():
	print e.Text
	app.quit()


app = TApplication()
app.desktop().show()

win = TWidget(Pos=(4,4), Size=(50,10), WindowTitle="Foo bar")

c = TCheckBox(win, Text="Is this working?", Pos=(2,3), Size=(10,10))


l = TLabel(win, Text="Hello, world", Pos=(2,1))

b = TPushButton(win, Text="OK", Pos=(4,5))
b.clicked.connect(test)


q = TPushButton(win, "Quit")
q.move(20, 5)
q.clicked.connect(exit)

e = TLineEdit(win, Text="edit me..", Pos=(3,4), Size=(18,1))

m = TMenu(win, Pos=(22, 2), Size=(5,5))
m.addAction("foo")
m.addAction("bar")

win.show()

app.run()