![](/img/trans.png)
[英]How can i change the color background to row in treeview ( python tkinter)
[英]How can I change the color of certain columns/boxes in a tkinter Treeview?
我想知道如何更改 tkinter treeview 框的顏色。 我的目標是嘗試做到這一點,如果列中的數字大於 0,則為綠色,而如果小於 0,則為紅色。 有誰知道我怎樣才能做到這一點?
請參閱此頁面以了解所有小部件及其樣式選項的概述。 從它的底部,您可以選擇以下選項之一:
Treeview (widget):
background
foreground
fieldbackground
Heading:
background
foreground
Item:
background
foreground
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.