My original solution was sort of over kill, this one is much better and simpler:
use Tk; use Tk::DialogBox; my $mw = new MainWindow(); my $content; my $text = $mw->Text()->pack(); my $ok = $mw->Button(-text => "OK", -command => \&grab)->pack(); MainLoop; print $content; sub grab { $content = $text->Contents(); $mw->destroy(); }
In reply to Re^3: Grabbing Text widget's contents after MainLoop
by pg
in thread Grabbing Text widget's contents after MainLoop
by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |