[Tkinter-discuss] Custom cursor?

Jeff Epler jepler at unpythonic.net
Thu Feb 24 23:00:21 CET 2005


On my Linux machine, this worked in wish:
$ cd /usr/X11R6/include/X11/bitmaps
$ wish
% . configure -cursor {@cntr_ptr cntr_ptrmsk black white}

The Python version would probably read something like
    import Tkinter
    t = Tkinter.Tk()
    t.configure(cursor="@cntr_ptr cntr_ptrmsk black white")
    t.mainloop()
I suspect the 1-arg format "@example.cur" should work just as well on
Windows.

Tk_GetCursorFromData is a C API, while Tkinter mostly exposes the Tcl
API.  Reading the Tk_GetCursorFromData manual page, it looks like it
doesn't expose any capabilities that the @-form of the cursor property
doesn't (instance, the X and Y hotspots are named in the "cntr_ptr"
file), but maybe I'm missing something.

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.python.org/pipermail/tkinter-discuss/attachments/20050224/85fd803e/attachment.pgp


More information about the Tkinter-discuss mailing list