Changing row height for different treeviews tkitner

前端 未结 1 706
终归单人心
终归单人心 2021-01-22 14:14

I have 2 treeviews, and I want to set the row height for first to be 45. Im using style but when I change the row height for first treeview , it automatically chang

相关标签:
1条回答
  • 2021-01-22 14:35

    The Treeview style is the default style used for all Treeview widgets. If you change that, you change all Treeviews. If you want to change only one Treeview, make a new style based on the default Treeview style and alter that (reference):

    s.configure('MyStyle.Treeview', rowheight=45)
    
    NewTree= ttk.Treeview(myApp, height=4, style='MyStyle.Treeview') 
    
    0 讨论(0)
提交回复
热议问题