Ttk Treeview根(父级,顶层)节点不可见

时间:2018-09-28 15:07:25

标签: python tkinter treeview

我有一个Treeview,并且填充顶级节点,然后填充子级节点,但是顶级节点不可见。它们在那里并且可以正常运行,但是您看不到它们。

这是我的代码:

        for row in crystals.get_crystals():
            print('view row: ', row[0])
            # TODO: The root nodes are present but not visible
            idroot.append(self.crystal_tree.insert('', 'end',
                row[0], text=row[0], values="aaa"))
            print('idroot:', idroot)

        for idxtal in idroot:
            for row in crystals.get_xtal_info(idxtal):
                print('view row: ', row)
                self.crystal_tree.insert('', 'end', values=row)
                # TODO: Does not show up if placed as children
                # self.crystal_tree.insert(idxtal, 'end', values=row)
                # print('row =', row)
                self.crystal_tree.configure()
    window.update()

这就是我得到的: The 2 top parent nodes do not show up

0 个答案:

没有答案
相关问题