Paul Falbe wrote:
>I am trying to do the following:
>
>$c->CanvasBind("<ButtonPress-1>" => [\&set_point,$c,$p,Tcl::Ev('x'), Tcl::Ev('y')]);
>$c->CanvasBind("<B1-Motion>" => [\&set_lined_point,$c,$p,Tcl::Ev('x'), Tcl::Ev('y')]);
>
>Program doesn't complain about syntax but my functions set_point and
>set_lined_point never get called. Is this the proper way to bind
>events?
>
>
>
No compatible and easy way, unfortunately.
Please see at example .......\TclTk\tk-demos\widget_lib\floor.pl
somewhere near
$c->bind('<2>' => \\'xy', sub {
my ($x,$y) = (shift,shift);
my($c) = @_;
#my $e = $c->XEvent;
$c->scan('mark', $x, $y);
});
|