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

[E|B]
 2005-08-16 19:44
#44370 #44370
User since
2003-08-08
2561 Artikel
HausmeisterIn
[Homepage] [default_avatar]
@renee

Nicht unbedingt:

Code: (dl )
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();
Gruß, Erik!

s))91\&\/\^z->sub{}\(\@new\)=>69\&\/\^z->sub{}\(\@new\)=>124\&\/\^z->sub{}\(\@new\)=>);
$_.=qq~66\&\/\^z->sub{}\(\@new\)=>93~;for(@_=split(/\&\/\^z->sub{}\(\@new\)=>/)){print chr;}

It's not a bug, it's a feature! - [CGI-World.de]

View full thread Einzelne Buchstaben im Label färben