--- a/demo_menu.py Wed Jan 02 11:48:36 2013 +0100
+++ b/demo_menu.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)
menubar = MenuBar()
self.top.add(menubar)
@@ -50,22 +50,10 @@
self.top.layout = VerticalLayout()
-
- #button = Button('click!')
- #win.add(button)
- #button.x = 10
- #button.y = 7
-
- #button.connect('click', self.buttonclick)
- #self.button = button
-
- #subwin = Window(8,8)
- #win.add(subwin)
-
-
def on_top_keypress(self, ev):
if ev.keyname == 'escape':
self.terminate()
+ return True
if __name__ == '__main__':