The behaviour you describe is not a feature of Tk in any default configuration; it doesn't minimize other windows when you use any of the standard dialogs on any platform. It might be possible to write a script that did it by tracking and abusing events like <Focus>
, <Leave>
or <Deactivate>
, etc., but it would be ugly and non-portable. And bad user-interface design. (If anyone is thinking of trying to do this, DON'T DO IT!)
You might be able to fix things by specifying the -parent
option to be the window that you don't want to disappear (which marks the message box as being a helper window for that main one) but that can have visual effects too. Otherwise, you're probably going to have to work out what event handler is picking up on the message box and responding in an unexpected way. It shouldn't be any of the widget class handlers — they don't do this sort of thing — but you might have quite a large search ahead of you. Things to be particularly aware of are interactions between several event handlers where some are defined at different bind-tag levels. (You probably don't ever want to define behaviour at any levels other than widget and containing-toplevel; writing truly general controller scripts is very difficult, whereas making them work right for a particular widget or window is much simpler.)