python 2.7 tix清单文本属性

时间:2017-06-14 19:55:18

标签: python python-2.7 text-formatting tix

我目前有一个包含多个级别和子级别的清单。我正在尝试更改核对表中各行的文本颜色和文本属性,但是,我无法找到有关此内容的任何信息。我能找到的是如何改变整个清单小部件的整体属性。
有没有办法将控制字符附加到.add属性,类似于这个

self.cl.hlist.add('cl1.item2',text='Test 2.0',bg='red')

或者它完全是一个不同的命令?

1 个答案:

答案 0 :(得分:0)

Use config to change the text properties

self.cl.hlist.config(bg='white',fg = "#191919",bd=0, selectmode='none', selectbackground='White',selectforeground='black', drawbranch=True, pady=2)