|
From: Joe E. <jen...@fl...> - 2007-03-20 15:26:30
|
Christian Surlykke wrote:
>
> I'm sorry if this is too newbeish.
>
> If I call 'withdraw' on the root window, I cannot make a ttk::dialog show on
> the screen. This little script shows my problem:
>
> <snippet>
> package require tile
> wm title . "Root window"
> toplevel .tl
> ttk::dialog .dlg -type okcancel
> wm withdraw .
> </snippet>
Here's what's happening:
By default, [ttk::dialog] windows set [wm transient $dialog $parent],
where $parent is the nearest toplevel ancestor of $dialog --
in this case, ".tl" will be a transient child of ".".
Under most window managers, transient windows are only visible
when their parent is mapped. Since "." is withdrawn, its
transient children will also be hidden.
You can override this with [ttk::dialog .tl -parent {}].
* * *
This appears to be a common pitfall with [ttk::dialog] --
you're not the first to run into this. I was considering
changing things so that [ttk::dialog]s that are direct
children of "." are nontransient by default -- what do
others think?
--Joe English
jen...@fl...
|