demo_treeview.py
changeset 40 5faa38c10b67
parent 39 5e5deb1d3945
child 41 37b7dfc3eae6
--- a/demo_treeview.py	Mon Dec 17 23:27:37 2012 +0100
+++ b/demo_treeview.py	Wed Dec 26 01:00:31 2012 +0100
@@ -19,14 +19,20 @@
         model.add(['a', 'd', 'e'], 'g')
         model.add('/a/d/f', 'h')
 
+        for i in range(100):
+            model.add('/b', ['x'+str(i)])
+
         view = TreeView(model)
-        view.collapse('/a/d')
-        self.top.add(view)
+        #view.collapse('/a/d')
+
+        scroll = ScrollView()
+        scroll.add(view)
+        self.top.add(scroll, expand=True, fill=True)
 
         vert = VerticalLayout()
         self.top.layout(vert)
 
-    def globalkeypress(self, keyname, char):
+    def globalkeypress(self, eo, keyname, char):
         if keyname == 'escape':
             self.terminate()