Thread HList columnWidth: etwas wie width="100%" in HTML (21 answers)
Opened by styx-cc at 2006-06-06 18:12

styx-cc
 2006-06-07 23:11
#45640 #45640
User since
2006-05-20
533 Artikel
BenutzerIn

user image
[quote=ptk,07.June.2006, 20:33]Interessant, die Hintergrundfarbe ist ja alternierend! Wie hast du das geschafft?[/quote]
So:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
sub show_box_content {
$shelf_content -> deleteAll;
my @content = &get_box_content($_[0]);
my $i = 0;

#styles for the single rows
my $greyStyle = $shelf_content -> ItemStyle('text', -background => 'lightgrey', -font => 'Arial 8 bold', -foreground => 'black');
my $defaultStyle = $shelf_content -> ItemStyle('text', -font => 'Arial 8 bold', -foreground => 'black');
#give a value for shelf-hlist
for (@content) {
#print "Boxdate: $content[$i][0]\nBoxname: $content[$i][1]\nBoxdescribe: $content[$i][2]\n";
$shelf_content -> add($i, -data => $content[$i][2]);
$shelf_content -> itemCreate($i, 0, -text => $content[$i][0], -style => ($i % 2) ? $defaultStyle : $greyStyle);
$shelf_content -> itemCreate($i, 1, -text => $content[$i][1], -style => ($i % 2) ? $defaultStyle : $greyStyle);

$i++;
}
} #show_box_content


:-)

Hab mich jetzt ma durch einige Docus gehauen, ich finde keine passenden Optionen, ich schaffs ja nciht mal die aktuelle breite der HList auszulesen, dann koennte man ja die benoetigte Breite errechnen, da die Breite fuer die erste Zelle ja feststeht.

MfG\n\n

<!--EDIT|styx-cc|1149707802-->
Pörl.

View full thread HList columnWidth: etwas wie width="100%" in HTML