demo_treeview.py
changeset 62 2f61931520c9
parent 45 43b2279b06e1
child 64 03f591f5fe5c
--- a/demo_treeview.py	Thu Jan 10 00:03:34 2013 +0100
+++ b/demo_treeview.py	Fri Jan 18 22:36:50 2013 +0100
@@ -9,7 +9,7 @@
 
 class MyApplication(Application):
     def __init__(self):
-        Application.__init__(self)
+        Application.__init__(self, top_layout=VerticalLayout)
         self.top.add_handler('keypress', self.on_top_keypress)
 
         model = TreeModel()
@@ -29,8 +29,6 @@
         scroll.add(view)
         self.top.add(scroll, expand=True, fill=True)
 
-        self.top.layout = VerticalLayout()
-
     def on_top_keypress(self, ev):
         if ev.keyname == 'escape':
             self.terminate()