Setting cursor colors in tkinter

Edward K. Ream edream at tds.net
Fri Sep 20 17:09:06 CEST 2002


> from Tkinter import *
> root = Tk()
> root.configure(cursor='xterm red green')
>
> doesn't produce an error. The colours seem to be taken into account,
but
> the xterm cursor isn't really a good example. I tried
> root.configure(cursor='gumby red green') and the result was what I
expected.
>
> Maybe there are some issues on Windows?

Many thanks, Eric, for this information.

I am indeed running on XP.  Plain "gumby" works on my system, and the color
specs do not.  I ran the following test from wish:

proc createWindowWithCursor {} {
 toplevel .panel
 text     .panel.text
 .panel.text configure -cursor {gumby red green}
 pack .panel.text
}

This yields: bad cursor spec "gumby red green"

-cursor gumby or -cursor {gumby} work as expected, so this looks to me like
a Tk problem on Windows XP.

Edward





More information about the Python-list mailing list