[Tutor] tkinter hourglass

Drew Perttula drewp@bigasterisk.com
Tue Dec 31 19:13:01 2002


[replying to list]

Adam wrote:
> Drew wrote:
> >> Here's a simple usage that you can try in your interactive interpreter:
> 
> >> from Tkinter import *
> >> root=Tk()
> >> root.config(cursor="watch")
> 
> >> Now slide the mouse over the Tk window. Other cursor shapes include
> 
> I just tried those commands, and get a window, but it is blank and
> unresponsive. Hung.

I'm in Linux/X11; that simple example may not work in other systems. You
may also have to run root.mainloop() to "bring Tk to life" before you
can see the cursor change on some systems. In Tk/unix, I think setting
the cursor sends a command to the X server right away which is why I
can observe the effect without even starting the event loop.

-Drew