|
From: Jeff H. <je...@ac...> - 2007-03-20 17:50:54
|
Damon Courtney wrote:
> Well, but most all dialogs should be transient to something. That's
> just the way a dialog should be. At the very least, we could provide a
> helper proc to get the "best guess" transient parent. I typically do
> something like this:
>
> proc ttk::parentWindow { {toplevel .} } {
> return [lindex [wm stackingorder $toplevel] end]
> }
>
> ttk::dialog -parent [ttk::parentWindow]
I think there are 2 misconceptions here ...
1. all dialogs should be transient.
No, there are many cases for startup dialogs where you have no parent.
2. Tk should "best guess" everything.
I think this is an acceptable area to expect the user to provide their
own -parent to get the behavior, if desired.
For those reasons, I went with a user-required -parent.
Jeff
|