[Tkinter-discuss] Pointer busy

Michael Lange klappnase at web.de
Thu Jun 10 16:05:20 EDT 2004


On Wed, 9 Jun 2004 15:39:42 -0300 
"Batista, Facundo" <FBatista at uniFON.com.ar> wrote:

> Have a simple GUI.
> 
> One text entry, two buttons. When you press each button, something is done
> with the text you entered and it takes about 10 seconds.
> 
> You can click on any button. But when you click on it, I want the mouse
> pointer to show the sand clock. So I put this code:
> 
>     root.config(cursor="wait")
>     textoOut = funcion(textoIn)
>     root.config(cursor="")
> 
> This does NOT work, but if I put this:
> 
>     root.config(cursor="wait")
>     print "starting..."
>     textoOut = funcion(textoIn)
>     print "ending..."
>     root.config(cursor="")
> 
> Works OK!
> 
> Do you know why? I need some kind of flush?
> 
> I'm on Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)]
> on win32.
> 
> Thank you!
> 

I'm afraid I cannot really answer your question, but I guess that using

root.config(cursor="wait")
root.update_idletasks()
..etc...

should do the trick, at least that's what I normally do in such cases.

Michael



More information about the Tkinter-discuss mailing list