I need to update a label in a window every x seconds to get an variabel ("res") which is up to date.
My current code:
def init(win): win.title("Ausgangsposition") win.minsize(800, 600) lab=Label(win, text="Aktuell: " + res +" Euro", bg='#40E0D0', fg='#FF0000') lab.place(x=20, y=30) btn.pack() def updater(win): ids = lab.after(1000, updater) print ("Done")
(I don't post the complete code, I think this is enough to understand)
Nothing happens with the code above.
Any idea how to fix?
I need to stop the updater when window "wín" is being closed, how to do this, because I don't want to get errors in cmd.
All the best;