equal
deleted
inserted
replaced
9 |
9 |
10 class MyApplication(Application): |
10 class MyApplication(Application): |
11 |
11 |
12 def __init__(self): |
12 def __init__(self): |
13 Application.__init__(self) |
13 Application.__init__(self) |
|
14 self.window_manager.sig_keypress.connect(self.on_wm_keypress) |
14 #self.top.add_handler('keypress', self.on_top_keypress) |
15 #self.top.add_handler('keypress', self.on_top_keypress) |
15 |
16 |
16 t = open('../tuikit/core/widget.py').read() |
17 t = open('../tuikit/core/widget.py').read() |
17 editbox = TextBox(t) |
18 editbox = TextBox(t) |
18 |
19 |
20 #scroll.add(editbox) |
21 #scroll.add(editbox) |
21 |
22 |
22 self.root_window.add(editbox) |
23 self.root_window.add(editbox) |
23 #self.root_window.add(scroll, halign='fill', valign='fill') |
24 #self.root_window.add(scroll, halign='fill', valign='fill') |
24 |
25 |
25 def on_top_keypress(self, ev): |
26 def on_wm_keypress(self, ev): |
26 if ev.keyname == 'escape': |
27 if ev.keyname == 'escape': |
27 self.terminate() |
28 self.stop() |
28 return True |
29 return True |
29 |
30 |
30 |
31 |
31 if __name__ == '__main__': |
32 if __name__ == '__main__': |
32 app = MyApplication() |
33 app = MyApplication() |