demo_treeview.py
changeset 45 43b2279b06e1
parent 42 0224ce40792f
child 62 2f61931520c9
--- a/demo_treeview.py	Wed Jan 02 11:48:36 2013 +0100
+++ b/demo_treeview.py	Fri Jan 04 00:13:59 2013 +0100
@@ -10,7 +10,7 @@
 class MyApplication(Application):
     def __init__(self):
         Application.__init__(self)
-        self.top.connect('keypress', self.on_top_keypress)
+        self.top.add_handler('keypress', self.on_top_keypress)
 
         model = TreeModel()
         model.add('/',  ['a', 'b'])
@@ -34,6 +34,7 @@
     def on_top_keypress(self, ev):
         if ev.keyname == 'escape':
             self.terminate()
+            return True
 
 
 if __name__ == '__main__':