demos/03_application.py
changeset 118 8c7970520632
parent 117 8680c2333546
child 119 dd91747504dd
--- a/demos/03_application.py	Mon Feb 16 21:17:43 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#!/usr/bin/env python3
-
-from tuikit.core.application import Application
-from tuikit.widgets.label import Label
-from tuikit.widgets.button import Button
-from tuikit.widgets.textfield import TextField
-
-label = Label('Hello there!')
-button1 = Button()
-button2 = Button()
-field = TextField('text field')
-
-app = Application()
-app.root_window.add(label, 20, 10)
-app.root_window.add(button1, 20, 20)
-app.root_window.add(button2, 30, 20)
-app.root_window.add(field, 20, 30)
-app.root_window.focus_widget = field
-
-def on_keypress(ev):
-    if ev.keyname == 'escape':
-        app.stop()
-
-app.window_manager.sig_keypress.connect(on_keypress)
-
-app.start()
-