Changing cursors...

Xtian Muirhead xtian_the_great at hotmail.com
Sun Oct 31 01:48:49 EST 1999


Hello -

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:

      self.btnIterate['state'] = DISABLED # after the call to
      self.btnClear['state'] = DISABLED   # update_idletasks,
                                          # the buttons are
                                          # disabled, but...

      self.root['cursor'] = 'wait'        # ...this doesn't happen.
      self.root.update_idletasks()

      # do some processing... (cursor is an arrow)

      self.btnIterate['state'] = NORMAL
      self.btnClear['state'] = NORMAL
      self.root['cursor'] = 'arrow'

      # after the callback processing is finished the cursor is
      # still the arrow - if I comment this out, the cursor
      # does change, but not until the callback processing
      # finishes.

It looks like update_idletasks() doesn't do cursors - is this
correct? (I looked in all the answer-type places of which I
could think.)

Xtian

xtian at regurgitator.zzn.com








More information about the Python-list mailing list