my $cb = sub {
print "Over circle, args = @_!\n";
};
my $c = $mw->Canvas->grid;
my $o1 = $c->createOval(25, 25, 100, 100,
-outline => 'red',
);
$c->bind($o1, '<Motion>' => $cb);
If we give the oval a -fill color, the binding is
triggered anywhere over the item, as we'd like, but the
transparent effect is lost, and the Canvas background is obscured.
But we can surmount this problem with an empty stipple bitmap (even a
cursor bitmap!) coupled with any -fill color.
my $o2 = $c->createOval(155, 25, 225, 100,
-outline => 'red',
-fill => 'blue',
-stipple => '@trans_cur.xbm',
);
$c->bind($o2, '<Motion>' => $cb);