Leser: 1
|< 1 2 3 4 >| | 35 Einträge, 4 Seiten |
1 2 3
sub _{s;;xrqIpiql\\{}p{pl{R>rl{N{}gjwpkssq]>rl{N;;;*{{}=*{_};; ${{}={q{{{}}}=>[reverse+split+reverse+q;}{;]};${{}->{q{{{}}}}->[@{{}];} ${{}=reverse+_(q{{}}=>q{{}})^chr(30)x+length&_(q{{}}=>,q{{}})and+print;
Quote-textvariable => \$text Wie -text , nur das sich der Text ändert, wenn $text sich ändert.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#!/usr/bin/perl -w use Tk; use strict; my $counter = 0; my $var = "Du hast schon $counter Mal den Button geklickt."; my $windows = MainWindow->new; my $label = $windows->Label( -textvariabl e => \$var, ); my $button = $windows->Button( -text => "Hier klicken", -command => sub { ++$counter } ); $label->pack(); $button->pack(); MainLoop;
1 2 3
sub _{s;;xrqIpiql\\{}p{pl{R>rl{N{}gjwpkssq]>rl{N;;;*{{}=*{_};; ${{}={q{{{}}}=>[reverse+split+reverse+q;}{;]};${{}->{q{{{}}}}->[@{{}];} ${{}=reverse+_(q{{}}=>q{{}})^chr(30)x+length&_(q{{}}=>,q{{}})and+print;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#!/usr/bin/perl -w use strict; use Tk; my $counter; my $myvar = "Du hast den Button schon 0 mal gedrückt."; my $win = MainWindow->new; my $text = $win->Label(-textvariable => \$myvar); my $button = $win->Button( -text => "Klicke hier", -command => sub { ++$counter; $myvar = "Du hast den Button schon $counter mal gedrückt."; } ); $text->pack(); $button->pack(); MainLoop;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/usr/bin/perl -w use strict; use Tk; my $counter; my $myvar = "Der Zähler steht momentan auf 0."; my $win = MainWindow->new(-background => "#000000"); $win->title("Zählerprogramm"); my $text = $win->Label(-foreground => "white", -background => "#000000", -textvariable => \$myvar); my $button = $win->Button(-text => "+", -foreground => "white", -background => "#000088", -command => sub { handler(1) }); my $button2 = $win->Button(-text => "-", -foreground => "white", -background => "#000088", -command => sub { handler(2) }); $text->pack(); $button->pack(-side => "left"); $button2->pack(-side => "right"); MainLoop; sub handler { my $option = shift; $option == 1 ? ++$counter : --$counter; $myvar = "Der Zähler steht momentan auf $counter."; }
1 2 3
sub _{s;;xrqIpiql\\{}p{pl{R>rl{N{}gjwpkssq]>rl{N;;;*{{}=*{_};; ${{}={q{{{}}}=>[reverse+split+reverse+q;}{;]};${{}->{q{{{}}}}->[@{{}];} ${{}=reverse+_(q{{}}=>q{{}})^chr(30)x+length&_(q{{}}=>,q{{}})and+print;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/usr/bin/perl -w use strict; use Tk; my $var; $var = "Aktuelle Uhrzeit: " . localtime(time); my $win = MainWindow->new(-background => "#000000"); my $text = $win->Label( -textvariable => \$var, -background => "#000000", -foreground => "#FFFFFF" ); $win->repeat(1000, sub { $var = "Aktuelle Uhrzeit: " . localtime(time) }); $text->pack(); MainLoop;
1 2 3
sub _{s;;xrqIpiql\\{}p{pl{R>rl{N{}gjwpkssq]>rl{N;;;*{{}=*{_};; ${{}={q{{{}}}=>[reverse+split+reverse+q;}{;]};${{}->{q{{{}}}}->[@{{}];} ${{}=reverse+_(q{{}}=>q{{}})^chr(30)x+length&_(q{{}}=>,q{{}})and+print;
1 2 3
sub _{s;;xrqIpiql\\{}p{pl{R>rl{N{}gjwpkssq]>rl{N;;;*{{}=*{_};; ${{}={q{{{}}}=>[reverse+split+reverse+q;}{;]};${{}->{q{{{}}}}->[@{{}];} ${{}=reverse+_(q{{}}=>q{{}})^chr(30)x+length&_(q{{}}=>,q{{}})and+print;
|< 1 2 3 4 >| | 35 Einträge, 4 Seiten |