Thread Perl/Tk Frame->bind problem
(2 answers)
Opened by MatthiasW at 2009-03-08 20:20
du musst der bind-methode als erstes argument ein 'all' übergeben, dann
funktioniert es. Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #!/usr/bin/perl use strict; use warnings; use Tk; my $mw = tkinit; my $frame = $mw ->Frame(-height => 50, )->pack(qw/ -fill both -expand 1 /); my $text = $frame->Text() ->pack(qw/ -fill both -expand 1 /); my $label = $frame->Label(-text => 'Noch ein Widget') ->pack(qw/ -fill both -expand 1 /); $frame->bind('all','<Motion>' => sub { print "Frame-Motion\n" } ); MainLoop; Gerade weil wir alle in einem Boot sitzen, sollten wir froh sein, dass nicht alle auf unserer Seite sind.
|