Lines Matching refs:tree
10 def populate_tree(tree, node): argument
11 if tree.set(node, "type") != 'directory':
14 path = tree.set(node, "fullpath")
15 tree.delete(*tree.get_children(node))
17 parent = tree.parent(node)
27 id = tree.insert(node, "end", text=fname, values=[p, ptype])
31 tree.insert(id, 0, text="dummy")
32 tree.item(id, text=fname)
35 tree.set(id, "size", "%d bytes" % size)
38 def populate_roots(tree): argument
40 node = tree.insert('', 'end', text=dir, values=[dir, "directory"])
41 populate_tree(tree, node)
44 tree = event.widget
45 populate_tree(tree, tree.focus())
48 tree = event.widget
49 node = tree.focus()
50 if tree.parent(node):
51 path = os.path.abspath(tree.set(node, "fullpath"))
54 tree.delete(tree.get_children(''))
55 populate_roots(tree)
71 tree = ttk.Treeview(columns=("fullpath", "type", "size"), variable
75 vsb['command'] = tree.yview
76 hsb['command'] = tree.xview
78 tree.heading("#0", text="Directory Structure", anchor='w')
79 tree.heading("size", text="File Size", anchor='w')
80 tree.column("size", stretch=0, width=100)
82 populate_roots(tree)
83 tree.bind('<<TreeviewOpen>>', update_tree)
84 tree.bind('<Double-Button-1>', change_dir)
87 tree.grid(column=0, row=0, sticky='nswe')