Aboveyou has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, the below is a snippet from a code i wrote that what he basicaly do is run a select statement on Access database and for every value he gets (phone, email, name etc..) he create a button and insert the value as a text to the button. the code creates 5 buttons per row (could get up to 20 rows). what i want to do is that on every new search i do the program will delete the results(rows of buttons) of the previous search with one row i can do it but with higer i cant . any advice?
$mw = MainWindow->new; $mw->geometry("239x274"); $mw->resizable(0,0); $mw->configure(-background => "black"); $mw->title("test"); $mwf = $mw->Scrolled( 'Pane', -scrollbars => 'e', -background => 'white', -width => 620, -height => 165, -sticky => 'nwse', )->place( -x => 1, -y => 110); while (@row = $queryHandle->fetchrow) { $f1 = $mwf->Frame()->pack(-expand => 0,-fill => 'both' ); for $fr($f1) { $i =0; for (1..5) { $fr->Button( -relief => 'groove', -text => $row[$i], -background => 'white', -foreground => 'black', -command => [ \&ExtraInfo, $row[$i] + ], -font => "Ariel 8 bold", -height => 0, -width => 1 )->pack(-side=>'left',-expand => 1, -fi +ll => 'both' ); $i++; } } }

Replies are listed 'Best First'.
Re: Tl Widget
by Anonymous Monk on Jun 08, 2009 at 12:29 UTC