use strict; use warnings; use Tk; use Tk::ItemStyle; use Tk::Hlist; my $mw = MainWindow->new(); my $table = $mw->Scrolled( "HList", -header => 1, -columns => 1, )->pack(); $table->header('create', 0, -text => 'Text'); for (my $cnt = 0; $cnt < 5; $cnt++) { $table->add($cnt); $table->itemCreate($cnt, 0, -text => $cnt, -style => $mw->ItemStyle('text', -background => "lightblue")); if ( $cnt % 2 == 0 ) { $table->itemCget($cnt, 0, -style)->configure( -background => "yellow" ); } } MainLoop;