demo_menu.py
changeset 77 fc1989059e19
parent 64 03f591f5fe5c
equal deleted inserted replaced
76:fa5301e58eca 77:fc1989059e19
     9 
     9 
    10 class MyApplication(Application):
    10 class MyApplication(Application):
    11     def __init__(self):
    11     def __init__(self):
    12         Application.__init__(self)
    12         Application.__init__(self)
    13         self.top.add_handler('keypress', self.on_top_keypress, last=True)
    13         self.top.add_handler('keypress', self.on_top_keypress, last=True)
       
    14         self.top.add_handler('quit', lambda ev: self.terminate())
    14 
    15 
    15         helpwin = Window()
    16         helpwin = Window()
    16         helpwin.title = 'About'
    17         helpwin.title = 'About'
    17         helpwin.hide()
    18         helpwin.hide()
    18         self.top.add(helpwin)
    19         self.top.add(helpwin)