0

this is my first question here... Im doing a project that highlight words entered in a list How i can highlight it? my code:

   import tkinter
   root = tkinter.Tk()
   words = ["Potatos","Tomatoes","Carrots"]
   box = tkinter.Text(root)
   box.pack()
   root.mainloop()

How i can highlight the text of a color if i enter a word that is in the words list? im sorry if i sound stupid but im a novice

  • here is a similar question: https://stackoverflow.com/questions/14786507/how-to-change-the-color-of-certain-words-in-the-tkinter-text-widget/30339009 – JacksonPro Dec 12 '20 at 02:54
  • Does this answer your question? [How to highlight text in a tkinter Text widget](https://stackoverflow.com/questions/3781670/how-to-highlight-text-in-a-tkinter-text-widget) – acw1668 Dec 12 '20 at 08:40

0 Answers0