如何更改 tkinter Treeview 中某些 columns/boxes 的颜色?
How can I change the color of certain columns/boxes in a tkinter Treeview?
我想知道如何更改 tkinter 树视图框的颜色。我的目标是尝试做到这一点,如果列中的数字大于 0,则为绿色,而如果小于 0,则为红色。有谁知道我怎样才能做到这一点?
查看此 page 以了解所有小部件及其样式选项的概述。
您可以从它的底部选择以下选项之一:
Treeview (widget):
background
foreground
fieldbackground
Heading:
background
foreground
Item:
background
foreground
我想知道如何更改 tkinter 树视图框的颜色。我的目标是尝试做到这一点,如果列中的数字大于 0,则为绿色,而如果小于 0,则为红色。有谁知道我怎样才能做到这一点?
查看此 page 以了解所有小部件及其样式选项的概述。 您可以从它的底部选择以下选项之一:
Treeview (widget):
background
foreground
fieldbackground
Heading:
background
foreground
Item:
background
foreground