in reply to Re^4: Perl/Tk: Dialog boxes for idiots (me)
in thread Perl/Tk: Dialog boxes for idiots (me)

Well, you can iconise the MainWindow, or in Tk speak - iconify.

Although I don't have the documentation handy, the MainWindow is merely a special case of a "Toplevel" widget. Special in that it is displayed automatically when you call MainLoop. It is displayed automatically, but every other "Toplevel" must be spcifically placed using one or another of the geometry managers. Thus having created your MainWindow you should then be able to call the iconfy method:

$mw->iconify();
and have the pesky window disappear. To get it back?
$mw->deiconify();

However it may not reappear on the top of the other windows, to ensure this use the raise method:

$mw->raise();
jdtoronto

Replies are listed 'Best First'.
Re^6: Perl/Tk: Dialog boxes for idiots (me)
by herby1620 (Monk) on May 05, 2006 at 20:05 UTC
    Ah, yes, iconify, I know him well. Well, I tried that and while it nicely DOES iconify the main window, the Dialog box is iconified as well. Sorry about that. I thought it was a good idea as well.

    The "find the flag" idea based on the fact that messageBox is related to Dialog is good as well. An exercise for all.

    Why am I doing all of this? I'm running a script that is called by another (seperate Perl invocation) to do some tasks. I thought that having things like 'alert boxes' and 'dialog boxes' (admitally modal things) would be something desirable. So here I am. And so it goes.....