[Tutor] Tkinter mainloop()

Alan Gauld alan.gauld at btinternet.com
Tue Jul 6 17:32:10 CEST 2010


"Francesco Loffredo" <ilcomputertrasparente at gmail.com> wrote

> How can I ask a Canvas to redraw itself at my command? And if i 
> can't, when should I call the auto move?

You can ask the canvas to repaint itself by calling 
update_idle_tasks()
method. But in general you shouldn't need to. It's usually better to 
keep
your event handlers short enough that they return to the mainloop 
which
will then redraw as necessary for you.

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list