in reply to Tk input box
Here's another way, perhaps simpler, depending.
I use this to ask for input via a GUI widget, useful when I'm working outside the console on Win32.
use strict; use warnings; use Tk; my $enteredvalue; my $window = MainWindow->new(-title => 'myTitle'); my $entry = $window->Entry(-textvariable => \$enteredvalue)->pack; $entry->bind('<Return>', \&go ); $entry->focus; MainLoop; ### sub go { # Do your thing... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tk input box
by JediWizard (Deacon) on Sep 17, 2004 at 13:32 UTC | |
by Grygonos (Chaplain) on Sep 17, 2004 at 15:08 UTC |