Thread Perl/Tk canvas Position der Maus ausgeben (2 answers)
Opened by pktm at 2008-07-24 03:53

Spieler
 2008-07-24 14:31
#112579 #112579
User since
2007-09-24
70 Artikel
BenutzerIn
[default_avatar]
Hallo,

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use warnings;
use Tk;
my $mw =tkinit;
my $c = $mw->Canvas->pack(-fill => 'both',
-expand => 1);
$c->Tk::bind('<Motion>',[\&print_coords,Ev('x'),Ev('y')]);
MainLoop;
use Data::Dumper;
sub print_coords{
shift;
print Dumper \@_;
}


Wäre so etwas.

View full thread Perl/Tk canvas Position der Maus ausgeben