我有一个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()