Thread Einzelne Buchstaben im Label färben (8 answers)
Opened by pktm at 2005-08-14 03:46

Arkhen2
 2005-08-16 10:56
#44367 #44367
User since
2005-03-11
25 Artikel
BenutzerIn
[default_avatar]
Oder so ?

Code: (dl )
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();


Ok, ok sind mehrere Labels.

View full thread Einzelne Buchstaben im Label färben