Leser: 1
9 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl -w
use strict;
use warnings;
use Tk;
my $mw = MainWindow->new;
my @colours = qw(red green blue yellow white);
my @text = qw(L a b e l t e x t);
for( @text )
{
$mw->Label( -text => $_, -fg => $colours[rand @colours] )->pack( -side => 'left' );
}
MainLoop();
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
my $mw = MainWindow->new;
my @colours = qw(red green blue yellow white);
my @text = qw(L a b e l t e x t);
$mw->Label(-textvariable => \$text[$_], -fg => $colours[rand @colours] )->pack(-side => 'left') for 0..scalar(@text)-1;
MainLoop();
9 Einträge, 1 Seite |