Ppeoc has asked for the wisdom of the Perl Monks concerning the following question:
sub myListBox1{ my $var; my @arr123; my @lb = @_; my $mw = new MainWindow; $mw->title("Custom Adjustment"); foreach my $lab (@lb) { my $label = $mw->Label(-text=>"$lab")->pack(); my $entry = $mw->Entry( -textvariable => \ $var, -width=>30)->pack(); push @arr123, $var; } my $tx1= $mw->Label(-text=>" ")->pack(-anchor=>'center'); my $frame = $mw->Frame->pack( -anchor => 'w' ); $frame->Button(-text => "Exit", -width=>15, -command => sub{exit, $mw->destroy; })->pack(-side => "rig +ht", -anchor=>'cent +er', -fill => 'y'); $frame->Button(-text=>"Select", -command => sub{ $mw->destroy()}, )->pack(-side => "right", -anchor=>'center', -fill => 'y'); + MainLoop; return @arr123; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Entry widget in a loop
by beech (Parson) on Mar 30, 2016 at 00:28 UTC |