use Tk; use HListplus; my $mw = MainWindow->new(); # CREATE HEADER STYLE 1 my $headerstyle1 = $mw->ItemStyle( 'window', -anchor => 'nw', -pady => -10, -padx => 10, ); # CREATE MY HLIST my $hlist = $mw->Scrolled( 'HListplus', -scrollbars => 'oe', -columns => 2, -header => 1, -width => 40, -headerstyle => $headerstyle1, )->pack( -side => 'left', -expand => 'yes', -fill => 'both' ); # CREATE HEADER STYLE 2 my $headerstyle = $hlist->ItemStyle( 'window', -anchor => 'nw', -pady => 0, -padx => 10, ); $hlist->header( 'create', 0, -itemtype => 'resizebutton', -style => $headerstyle, -text => 'Test Name', -activebackground => 'white', ); $hlist->header( 'create', 1, -itemtype => 'resizebutton', -style => $headerstyle, -text => 'Status', -activebackground => 'white', ); my $red = $hlist->ItemStyle( 'text', -foreground => '#800000', -background => 'white' ); my $blue = $hlist->ItemStyle( 'text', -foreground => '#000080', -anchor => 'e', -background => 'white' ); foreach ( [ Joe => '$10,000' ], [ Peter => '$20,000' ], [ Raj => '$90, 000 something to make it very much wider' ], [ Zinh => '$0' ] ) { my $e = $hlist->addchild(""); $hlist->itemCreate( $e, 0, -itemtype => 'text', -text => $_->[0], -style => $red ); $hlist->itemCreate( $e, 1, -itemtype => 'text', -text => $_->[1], -style => $blue ); $hlist->selectionClear(); } Tk::MainLoop;