O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Mouse Cursor

The cursor attribute defines the mouse cursor. Example 38-6 shows the cursors that come built into Tk:

Example 38-6 The Tk cursors.

A foreground and background color for the cursor can be specified. Here are some example cursor specifications:

$w config -cursor watch            ;# stop-watch cursor
$w config -cursor {gumby blue}     ;# blue gumby
$w config -cursor {X_cursor red white} ;# red X on white

The other form for the cursor attribute specifies a file that contains the definition of the cursor bitmap. If two file names are specified, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required