How to edit the style of a heading in Treeview (Python ttk)

荒凉一梦 提交于 2019-12-05 03:06:16

this works where I am -

style = ttk.Style()
style.configure(".", font=('Helvetica', 8), foreground="white")
style.configure("Treeview", foreground='red')
style.configure("Treeview.Heading", foreground='green') #<----

http://www.tkdocs.com/tutorial/styles.html

You can alter the font used in the Treeview headers using the default named font 'TkHeadingFont'.

Eg:

font.nametofont('TkHeadingFont').configure(size = 15)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!