标签: python tkinter treeview
假设一个简单的表有:
table = ttk.Treeview(self) table.column('#0', width=50) table.heading('#0', text='hey')
一旦我将文本设置为hey,我想以某种方式获得该值。我能以任何方式获得这个价值吗?
hey
我可以使用table['columns']访问列,但#0无法显示
table['columns']
#0
答案 0 :(得分:0)
看起来可以使用.heading()
.heading()
table.heading('#0')['text']