in reply to Entry widget values are not getting
You may squeeze some other functionality out of it, but I wouldn't count on it working the way you expect. Here is how I might do it.
#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = MainWindow->new; my %ents; for( my $i=0;$i<=5;$i++) { $ents{$i} = $mw->Entry( -bg => 'white', )->pack(); $ents{$i}->bind('<Return>', \&display ); } MainLoop; sub display { foreach my $ent (sort keys %ents ){ print $ents{$ent}->get(),"\n"; } print "\n\n"; }
|
|---|