use strict; use warnings; use Tk; use Tk::HList; use Tk::ItemStyle; use Tk::HdrResizeButton; my $mw = MainWindow->new(); my $table_hl = $mw->Scrolled( "HList", -header => 1, -columns => 2, -scrollbars => 'ose', -width => 70, -selectbackground => '#539FFD', -selectmode => 'extended', )->pack(); $table_hl->header('create', 0, -text => "1"); $table_hl->header('create', 1, -text => "2"); $table_hl->add(1); $table_hl->itemCreate(1, 0, -text => "Schriftart 123"); $table_hl->itemCreate(1, 1, -text => "Scrhiftart 123"); my $style = $table_hl->ItemStyle( 'text', -stylename => 'red', -foreground => 'red', -selectforeground => 'red', ); $table_hl->add(2); $table_hl->itemCreate(2, 0, -text => "Schriftart 123", -style => 'red'); $table_hl->itemCreate(2, 1, -text => "Scrhiftart 123", -style => $style); MainLoop;