Thread [Tk] Tk-Spinbox - Command ausführen
(9 answers)
Opened by Kean at 2014-05-22 11:41 Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 #!/usr/local/bin/perl use strict; use warnings; use Tk; my $mw = tkinit(); my $txt_var; my $spin = $mw->Spinbox(-from => 0, -to => 100, -textvariable => \$txt_var)->pack(-side => 'left'); $spin->bind('<Return>', sub {print shift . "\n" . $txt_var}); MainLoop; Ich hoffe ich habe es korrekt verstanden. Gruß edit: typo Pörl.
|