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
use Tk; use Tk::HList; my $mw = MainWindow->new(); my $hl = $mw->Scrolled( "HList", -header => 1, -columns => 3, -scrollbars => 'ose', -selectbackground => '#539FFD', -width => "70", -selectmode => 'extended', )->pack(); $hl->header('create', 0, -text => 'Vorname'); $hl->header('create', 1, -text => 'Name'); $hl->header('create', 2, -text => 'Alter'); $hl->add(0); $hl->itemCreate(0, 0, -text => "Max"); $hl->itemCreate(0, 1, -text => "Mustermann"); $hl->itemCreate(0, 2, -text => "30"); $hl->add(1); $hl->itemCreate(1, 0, -text => "Michaela"); $hl->itemCreate(1, 1, -text => "Mustermann"); $hl->itemCreate(1, 2, -text => "28"); MainLoop;