Re: Tk: wm overrideredirect - restore window border afterwards ?



Gerald W. Lester wrote:
Frank Goenninger DG1SBG wrote:
Hi there again,

seeking advice on wm overrideredirect...

I successfully managed to create a window without any border or title
bar. Now the question is: Can I afterwards make the window decorations
appear by issuing a "wm overrideredirect . 0" ?

No, it is a one way ticket.

You sure about that?

I think the only trick is to withdraw the window, flip the bit, then deiconify it. At least, this works for me on windows:

button .b -text "Toggle borders" -command borders
pack propagate . 0
pack .b

set borders 1

proc borders {} {
global borders
wm withdraw .
if {$borders} {
wm overrideredirect . 1
set borders 0
} else {
wm overrideredirect . 0
set borders 1
}
wm deiconify .
}
.


Quantcast