t = Tkinter.Tk()
t.configure(cursor=("@/usr/X11R6/include/X11/bitmaps/star",
"/usr/X11R6/include/X11/bitmaps/starMask", "white", "black"))
t.mainloop()
As noted in the tk8.3 Tk_GetCursor manpage, this "will not work on
Windows or Macintosh computers".
Jeff
Hi
actually you _can_ change the cursor on Windows computers:
from Tkinter import *
root = Tk()
root.configure(cursor='spraycan')
root.mainloop()
This will show a spraycan (quite ugly though) in the window.
The names of the cursors can be found in "Tkinter reference: A GUI for
Python", located at http://www.nmt.edu/tcc/help/lang/python/tkinter.html
Regards
Jorgen Cederberg
Mr. Cederberg: Well Jorgen, you better wake up before answering any
newsgroups postings. The OP asked for his _own_ cursors.
Jorgen Cederberg: Gee I'm really sorry, I'll try to remember that. And I
don't know how to do that on a windows machine.
Regards
Jorgen Cederberg
The same manpage ( http://www.tcl.tk/man/tcl8.3/TkLib/GetCursor.htm#M9 ) shows a
form (t.configure(cursor="@/path/to/file.cur")) that works on Windows. You just
have to define your cursor in a .cur or .ani file; you can do that with Visual
Studio for example.
On Macintosh's, the form t.configure(cursor="name") works for all cursors
defined as resources of type crsr or CURS (see the same manpage, a few
paragraphs above: http://www.tcl.tk/man/tcl8.3/TkLib/GetCursor.htm#M6 )
HTH
--
- Eric Brunel <eric dot brunel at pragmadev dot com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com