[Tkinter-discuss] Cursors

Michael Lange klappnase at web.de
Sat Nov 11 07:42:45 EST 2017


Hi,

On Thu, 9 Nov 2017 19:51:16 +0000
adil gourinda <rikudou__sennin at live.com> wrote:

> Where the cursors are stored in the file system ?

in Debian the cursors appear to be in /usr/X11R6/lib/X11/icons ,
probably it's the same with Ubuntu.

> And if I want to make
> my own cursors, to which file's format I should convert the images? I
> work on kubuntu 17.04 LTS

There is a page on the Tcl wiki where this is discussed in detail:

http://wiki.tcl.tk/8674

The exact procedure depends on the platform in use.
On X11 you will have to store the cursor data in an xbm (X-bitmap) file,
then you can do something like:

  root = Tk()
  b = Button(root, text='Close', cursor=('@example.xbm', 'green'),
             command=root.quit)
  b.pack(padx=100, pady=100)
  root.mainloop()

Best regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

But it's real.  And if it's real it can be affected ...  we may not be
able to break it, but, I'll bet you credits to Navy Beans we can put a
dent in it.
		-- deSalle, "Catspaw", stardate 3018.2


More information about the Tkinter-discuss mailing list