use Tk; $mw = new MainWindow; $mw->title("Test"); $mw->Label(-text => "Pick an item from the list")->pack; $frm_versions=$mw->Frame()->pack; $list=$frm_versions->Listbox(-selectmode=>'single', -width=>0, -height=>0); $list->pack; $list->insert('end', 'Text', 'MoreText', 'TextityTextText', 'TextyTextalicious', 'Textathon'); $textarea=$mw->Frame()->pack; $txt=$textarea->Scrolled("Text", -scrollbars=>'e', -width=>45, -height=>10); $txt->pack; $mw->Button(-text => "GO!!!!", -command => \&go)->pack(-side => 'bottom', -expand => 1, -fill => 'x'); MainLoop(); sub go{ $listselection=$list->curselection(); if ($listselection eq "") { $todo = ""; }else { $todo=$list->get($listselection); } $txt -> delete('0.0', 'end'); if ($todo){ $txt -> insert('end',"Let's see what you picked...\n\n\n"); sleep (2); $txt -> insert('end',"You picked $todo...\n"); }else{ $txt->insert('end',"Please pick something from the list...\n"); last; } }