In Master PerlTk Chapeter23, pTk Potpourri, it discusses how to make custom cursors:

Besides a built-in cursor name, the -cursor option also accepts a cursor specification, which is an array reference of four elements: an X11 bitmap (XBM) filename, a mask filename, and foreground and background colors.

on unix/linux it would look like

my $cursor = [qw/@mouse.xbm mouse.mask brown white/];
The X11/cursorfont.h file contains the names, tracking it down from there is left to you.

Here is code from the MPTk's sample code:

#!/usr/bin/perl -w use Tk; use strict; my $mw = MainWindow->new; my $c = $mw->Canvas->grid; $c->configure(-cursor => ['@images/trans_cur.xbm', 'images/trans_cur.msk', 'black', 'white']); $c->CanvasBind('<Motion>' => sub { my($c) = @_; my($x, $y) = ($Tk::event->x, $Tk::event->y); print "cursor at canvas coordinate ($x,$y)\n"; }); MainLoop;
It is supposed to give you a transparent cursor, but it shows the idea. If you want the images, track them down on the Mptk website, under Chapter code samples.

I'm not really a human, but I play one on earth. flash japh

In reply to Re: Modifying Standard Tk Cursors? by zentara
in thread Modifying Standard Tk Cursors? by Dr. Mu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.