I'm running the script on XP and Perl 5.8.8
I found the following work around (using protocol('WM_DELETE_WINDOW'):
use warnings; use strict; use Tk; use Tk::Dialog; my $mw = MainWindow->new(); my $dialog_setup = $mw->Dialog(-title => "My Window", -background=>"wh +ite",-buttons => [qw/Ok Quit/]); $dialog_setup->protocol('WM_DELETE_WINDOW', \&destroy_dialog); my $answer = $dialog_setup->Show(); if ($answer=~ /Ok/){ do_something();} MainLoop(); sub destroy_dialog { $dialog_setup ->destroy; }
In reply to Re^2: tk close window
by fanticla
in thread tk close window
by fanticla
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |