Thread [Tk] Tk-Spinbox - Command ausführen (9 answers)
Opened by Kean at 2014-05-22 11:41

styx-cc
 2014-05-22 12:30
#175626 #175626
User since
2006-05-20
533 Artikel
BenutzerIn

user image
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.

View full thread [Tk] Tk-Spinbox - Command ausführen