简体   繁体   English

无法使用 tkinter treeview 调整行

[英]Can't adjust row with tkinter treeview

I was making a treeview for my programm (tkinter).我正在为我的程序(tkinter)制作 treeview。 But I can't adjust the row.但我无法调整行。 Here is my code:这是我的代码:

from tkinter import *
import tkinter as tk
from tkinter import ttk
st=ttk.Style()
st.configure('MyStyle.Treeview', rowheight=100)
trv=ttk.Treeview(frame1,style='MyStyle.Treeview',column=(1,2,3,4), show="headings", height=6)
trv.pack(side=LEFT, expand=YES, fill=BOTH)

Thank u感谢你

I found the solution.我找到了解决方案。 I used in my script a theme for my treeview (ttk.Style.theme_use()) which hid my code After removing it it works In fact I changed the order我在我的脚本中为我的 treeview (ttk.Style.theme_use()) 使用了一个主题,它隐藏了我的代码删除它后它可以工作事实上我改变了顺序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM