0

I am making a tkinter window to show me the weather currently. Every 5 minutes, it will get the new weather, and then replace the old text.

To put in the text, I am using a Tkinter Label.

T = Label(root, bg="black", fg="white", height=2, width=30, text="Some Text")

However, I looked on the internet, and I found a delete function, but it does not work with labels.

How would I go about changing the label text?

I want to change the label while the program is still in mainloop.

Pokestar Fan
  • 174
  • 1
  • 12

1 Answers1

1

You can use this way :

T = Label(root, bg="black", fg="white", height=2, width=30, text="Some Text")
T.config(text='New text')
PRMoureu
  • 12,817
  • 6
  • 38
  • 48