Sep-03-2022, 03:53 PM
(This post was last modified: Sep-03-2022, 03:53 PM by deanhystad.)
Tkinter does not process events unless it is running imainloop(). You are blocking mainloop when you do this:
And this is bad:
while run == True: stroke_count += stroke_rate sleep(1)If you want your tkinter program to do something every second you should look at .after()
And this is bad:
lb2 = Label(root, print(str(stroke_count) +' stk')) lb2.grid(row=3, column=0)Update the label text. Don't make another label.