yike has asked for the wisdom of the Perl Monks concerning the following question:
When starting the toplevelwindow, I want to deactivate the mainwindow. Meaning: put toplevelwindow on top and avoid that any action can be done on the mainwindow. I know it can be done with a withdraw and deiconify but I don't want that the mainwindow totally disappears; I just want to 'deactivate' it. In fact, I want the same behaviour as 'getOpenFile'.$mw = MainWindow->new(); $mw->Button(-text=>"A", -command=>\&start)->pack(); MainLoop; sub start { $tl=$mw->Toplevel(); $tl->Button(-text=>"B", -command=>sub{destroy $tl})->pack(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Deactivate MainWindow when starting Toplevel
by jdporter (Paladin) on Apr 01, 2004 at 19:26 UTC | |
|
Re: Deactivate MainWindow when starting Toplevel
by eserte (Deacon) on Apr 02, 2004 at 09:30 UTC | |
by yike (Novice) on Apr 02, 2004 at 10:49 UTC |