demo_treeview.py
changeset 39 5e5deb1d3945
parent 19 5e78d52ebb24
child 40 5faa38c10b67
equal deleted inserted replaced
38:c6e170452c7f 39:5e5deb1d3945
    14 
    14 
    15         model = TreeModel()
    15         model = TreeModel()
    16         model.add('/',  ['a', 'b'])
    16         model.add('/',  ['a', 'b'])
    17         model.add('/a', ['c', 'd'])
    17         model.add('/a', ['c', 'd'])
    18         model.add((0,1), ['e', 'f'])
    18         model.add((0,1), ['e', 'f'])
    19         model.add('/0/1/0', 'g')
    19         model.add(['a', 'd', 'e'], 'g')
    20         model.add('/a/d/f', 'h')
    20         model.add('/a/d/f', 'h')
    21         
    21 
    22         view = TreeView(model)
    22         view = TreeView(model)
    23         view.collapse('/a/d')
    23         view.collapse('/a/d')
    24         self.top.add(view)
    24         self.top.add(view)
    25 
    25 
    26         vert = VerticalLayout()
    26         vert = VerticalLayout()