Leser: 13
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
27
28
29
30
31
32
33
34
35
SYNOPSIS
use Tk;
use Tk::HList;
use Tk::HdrResizeButton;
my $mw = MainWindow->new();
# CREATE MY HLIST
my $hlist = $mw->Scrolled('HList',
-columns=>2,
-header => 1
)->pack(-side => 'left', -expand => 'yes', -fill => 'both');
# CREATE COLUMN HEADER 0
my $headerstyle = $hlist->ItemStyle('window', -padx => 0, -pady => 0);
my $header0 = $hlist->HdrResizeButton(
-text => 'Test Name',
-relief => 'flat', -pady => 0,
-command => sub { print "Hello, world!\n";},
-column => 0
);
$hlist->header('create', 0,
-itemtype => 'window',
-widget => $header0,
-style=>$headerstyle
);
# CREATE COLUMN HEADER 1
my $header1 = $hlist->HdrResizeButton(
-text => 'Status',
-command => sub { print "Hello, world!\n";},
-column => 1
);
$hlist->header('create', 1,
-itemtype => 'window',
-widget => $header1,
-style => $headerstyle
);
$hlist->add($entryPath ?,option=>value, ...?)
1 2 3
$hlist->add( $zeilennummer ); # damit das "Zeilenobjekt" da ist $hlist->itemCreate( $zeilennummer, 0, -text => 'irgendwas' ); # 1. Spalte (2. Parameter = Spaltennummer - 1) $hlist->itemCreate( $zeilennummer, 1, -text => 'irgendwas2' ); # 2. Spalte