【发布时间】:2011-04-08 23:59:58
【问题描述】:
我正在做一个项目,该项目需要我在 Tkinter 标签小部件中为某些文本添加下划线。我知道可以使用下划线方法,但根据参数,我似乎只能让它为小部件的 1 个字符加下划线。即
p = Label(root, text=" Test Label", bg='blue', fg='white', underline=0)
change underline to 0, and it underlines the first character, 1 the second etc
我需要能够为小部件中的所有文本加下划线,我确信这是可能的,但是如何?
我在 Windows 7 上使用 Python 2.6。
【问题讨论】:
标签: python windows label tkinter underline