gocpon has asked for the wisdom of the Perl Monks concerning the following question:
Dear All, I have written code to create 5 Entry widgets by using for loop, Now i want to capture values of each entry widget and print those values but now i am getting last entry box value only,remaining values are not getting.Kindly help me..
#! c:\perl\Bin use Tk; use Tk::LabFrame; $mw = MainWindow->new; for($i=0;$i<=5;$i++) { $j=$mw->Entry(-validate=>all,-validatecommand=>\&f)->pack(); } sub f { $i1=$j->get(); print $i1; } MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Entry widget values are not getting
by aitap (Curate) on Aug 10, 2012 at 10:32 UTC | |
|
Re: Entry widget values are not getting
by zentara (Cardinal) on Aug 10, 2012 at 10:59 UTC |