Mouse Cursors on Tkinter

Jeff Epler jepler at unpythonic.net
Wed Feb 11 13:40:21 EST 2004


Here is a small program that works on my system (linux/X11)to change
the cursor of a Tkinter window:
    import Tkinter

    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




More information about the Python-list mailing list