in reply to clsoing sub window upon execution?
This can be made much simpler, by using Tk::Dialog.
use Tk; use Tk::Dialog; use strict; use warnings; my $top = new MainWindow(-title => "demo"); my $save = $top->Button(-text => "Close", command => \&process_save)-> +pack(); MainLoop; sub process_save { my $dialog = $top->Dialog(-title => "Save?", -text => "Content ch +anged, save the changes?", -buttons => ["OK", "Cancel"]);#in real wor +ld, you only display this, if the content changed my $response = $dialog->Show(); print $response, "\n" #in real code, handle the response... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: clsoing sub window upon execution?
by Elijah (Hermit) on Dec 04, 2003 at 05:13 UTC | |
by pg (Canon) on Dec 04, 2003 at 05:27 UTC | |
by Elijah (Hermit) on Dec 04, 2003 at 15:56 UTC | |
by Grygonos (Chaplain) on Dec 04, 2003 at 17:15 UTC |