简体   繁体   中英

Can't adjust row with tkinter treeview

I was making a treeview for my programm (tkinter). 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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