我可以在 Text
小部件中将 underline
或 overstrike
样式应用于文本。
是否可以加划线?
import tkinter as tk
root = tk.Tk()
text = tk.Text(root)
text.pack(padx=4,pady=4,fill=tk.BOTH,expand=tk.YES)
text.tag_configure('underline', underline=True)
text.tag_configure('overstrike', overstrike=True)
text.insert(tk.END, 'Underline text.\n','underline')
text.insert(tk.END, 'Overstrike text.\n','overstrike')
root.mainloop()
最佳答案
不,不可能做上划线。
关于python - Tkinter 中的上划线文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33711795/