Changing cursors...

Gordon McMillan gmcm at hypernet.com
Sun Oct 31 07:54:37 EST 1999


Xtian Muirhead writes:
> 
> I've been having a play with Tkinter, and I've ported across a
> program that I wrote while learning VB, but I've had one problem.
> There's one step that has a chunk of processing which takes a few
> seconds to complete. In the old program, I changed the cursor to
> an hourglass at the start, and reset when the program finished.
> Trying to do the same in the new version doesn't seem to work:

[snip]

No Tk expert, but as I recall, this is a general problem with Tk. 
Even murkier: I think Tk schedules the cursor-change which 
means, of course, that it doesn't happen until too late. (Java's 
AWT had/has? the same problem but even worse - it would 
get confused and leave the cursor in the wrong state).

The work-around that I saw wasn't, to my mind, worth the 
effort, and I decided to be satisfied with the button remaining 
depressed. But perhaps the eff-bot has a more elegant 
solution.



- Gordon




More information about the Python-list mailing list