문제

I am writing a program that requires the tkinter canvas to update graphics. In its previous form it was written in turtle. The turtle function to update the canvas is turtle.ontimer() Is there a tkinter equivalent?

도움이 되었습니까?

해결책

You can use after method:

For example:

root = Tk()

...

root.after(2000, callback) # call `callback` function in 2000 ms.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top