我正在做一个项目,该项目需要我在 Tkinter 标签小部件中为一些文本加下划线。我知道可以使用下划线方法,但根据参数,我似乎只能让它为小部件的 1 个字符加下划线。IE
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。