Updated 2012-05-04 16:59:15 by AMG

BLT has a busy command, which

  • changes the cursor to a "clock-face"
  • captures all pertinent WIMP events (so "clicks" don't back up ...), and
  • after the operation in question has finished, restores the cursor.

The way BLT manages the user interface is by pasting an invisible window over the "busied" frame. The invisible window intercepts all clicks and keystrokes ...

The effect of clock-face cursor can be had in pure Tk by
 . configure -cursor watch
 # time-consuming action here...
 . config -cursor {} ;# RS

Example code for the cursor change appears in an old private page [1] as well as the Cookbook [2].

The busy command has been extracted from BLT and made available as a stand-alone package using Critcl.

As discussed above, busy allows you to "busy" out a portion of a GUI application's window hierarchy, so that it can't receive keyboard or mouse events. This is most useful for client/server applications where the client GUI should display an hourglass or clock cursor while the server is doing some work on its behalf.

The cross-platform Starkit contains binaries for AIX, HP-UX, Linux, MacOSX, Solaris, Tru-64 and Windows. It is available on the Starkit Archive at http://tcl.tk/starkits/busy.kit.

Source is available from [3]. To build it on your favourite platform, get Critcl from http://tcl.tk/starkits/critcl.kit and build as follows
    $ critcl -pkg busy

If you do, please contribute back the resulting shared library to stevel for inclusion in the busy Starkit

See also: tk busy tkbusy Byzi