Does there exist any way to make sure, that chosen tk_messageBox always will
be "topmost", whatever was on the screen before?
Maybe "-topmost" option could be added to tk_messageBox' options set in the
future?
--
Zbigniew
'-topmost' is MS-Windows specific.
Check out 'wm stackorder' and use the results to set the -parent option
to tk_messageBox.
Also check out the focus command. Along with winfo toplevel, this
*should* give you the toplevel window with the current focus.
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
hel...@deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/
> Check out 'wm stackorder' and use the results to set the -parent option
> to tk_messageBox.
>
> Also check out the focus command. Along with winfo toplevel, this
> *should* give you the toplevel window with the current focus.
Something like this?
#v+
proc currentTopmostWindow { {path "."} } {
if { [focus] ne "" } { set ctmw [winfo toplevel [focus]]
} else { set ctmw [lindex [wm stackorder .] end]
}
if { $ctmw eq "" } { set ctmw "." }
return $ctmw
}
#v-
--
Zbigniew