#!/usr/bin/perl use Tk; use Tk::HList; my $mw = MainWindow->new(); $b1 = $mw->Button(-text=>"Button1")->pack(); $b2 = $mw->Button(-text=>"Button2")->pack(); $hlist = $mw->HList( -selectmode => 'single', -columns=>3, -background=>"Wheat", -header=>1)->pack(-fill=>'both',-expand=>1); $hlist -> focusFollowsMouse(); $hlist -> headerCreate(0, -text=>"ABC"); $label = $hlist->Label(-text=>"DEF", -pady=>1); $hlist -> headerCreate(1, -itemtype=>"window", -window=>$label); $button = $hlist->Button(-text=>"GHI"); $hlist -> headerCreate(2, -itemtype=>"window", -window=>$button); for (1..9) { $hlist->add($_); $hlist->itemCreate($_, 0, -text=>"$_"x5); $hlist->itemCreate($_, 1, -text=>"$_"x10); } MainLoop;