I made a python script to find some lyrics by specific words, and when i show the result I want to recolor that searched word.
I have a click listener on a button, which calls the corresponding function, named bestMatch
. The result is big string, which will be the text of my result label.
import tkinter as tk
def clickMe():
global window
global results
global name
retValue = bestMatch(name.get())
result = ''
for i in retValue:
result = result + enekeskonyv[int(i[0])] + '\n'
for widget in resultFrame.winfo_children():
widget.destroy()
tk.Label(resultFrame, text= 'Result by- ' + name.get() + ': \n' + result).grid(padx=10, sticky=W)
That last label will contain my result, and I did not found any recolor methods for tkinter labels.