in reply to Tk Error
It worked correctly for me.use strict; use warnings; use Tk; my $mainWindow=MainWindow->new; my $textEntry = $mainWindow->Entry(-state => 'normal') -> pack( -side +=> 'bottom', -expand => 'BOOLEAN'); $textEntry -> bind('<Return>' => &get); sub get { my $text = $textEntry -> get(); print "$text\n"; } MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tk Error
by GrandFather (Saint) on Mar 27, 2010 at 05:05 UTC | |
by k0rn (Acolyte) on Mar 28, 2010 at 02:54 UTC |