#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = new MainWindow; $mw->title("Close test"); $mw->geometry("400x250"); my $txt = $mw->Scrolled("Text")->pack; #catches mw when closing $mw->protocol('WM_DELETE_WINDOW' => sub { print $txt->get('1.0','end'); $mw->destroy; #avoids exit }); MainLoop;
In reply to Re: Grabbing Text widget's contents after MainLoop
by zentara
in thread Grabbing Text widget's contents after MainLoop
by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |