问题描述
我正在使用python3.8创建一个ttk.Treeview小部件,我不希望#0列伸展。 我尝试了“ stretch”属性的所有可能值,但无济于事。
stretch = tk.NO
stretch = False
stretch = 0
下面是一个示例片段
alarmframe = ttk.Treeview(master,selectmode='extended')
alarmframe['columns'] = ("alarmname","timestamp")
alarmframe.pack(side='top',anchor='nw')
alarmframe.column("#0",width=20,stretch=False)
for row in range(6) :
alarmframe.insert('','end',values=("Alarm" + str(row)) ```
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)