I am looking for a way to underline each word in a label text per condition I've set.
I looked for similar questions posed before and I've only managed to either Underline the entire text at once or one single letter. My app is essentially supposed to be a text typing application. For now i'm tracking each word, I would like to Underlining the upcoming word. here's my code.
from tkinter import *
from tkinter import font
class App:
def __init__(self):
self.root = Tk()
self.count = 0
l = Label(text="Hello, world")
l.pack()
f = font.Font(l,l.cget("font"))
f.configure(underline = True)
l.configure(font=f)
self.root.mainloop()
if __name__ == "__main__":
app=App()
For example purposes one can use the self.root.after(mili, method)
I'm using tkinter python 3.6.6 Thanks in advance.