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++;
}
}
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.