in reply to Re: Re: clsoing sub window upon execution?
in thread clsoing sub window upon execution?
If that's what you want, then go with Tk::DialogBox, which allows you to add sub-widget. Here is a piece of demo:
use Tk; use Tk::DialogBox; use strict; use warnings; my $top = new MainWindow(-title => "demo"); my $save = $top->Button(-text => "Goto line", command => \&process_sav +e)->pack(); my $line_num; MainLoop; sub process_save { my $dialog = $top->DialogBox(-title => "Save?", -buttons => ["OK", + "Cancel"]); $dialog->add("Entry", -text => \$line_num)->pack(); my $response = $dialog->Show(); print "[$response, $line_num]\n" #in real code, handle the respons +e... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: clsoing sub window upon execution?
by Elijah (Hermit) on Dec 04, 2003 at 15:56 UTC | |
by Grygonos (Chaplain) on Dec 04, 2003 at 17:15 UTC |