* Manfred Stelzhammer <manfred@antispam.at>--- Synchronet 3.20a-Linux NewsLink 1.114
| % wm geometry . 400x400
| % . configure -background yellow
| % pack [frame .f1 -container 1] -fill both -expand yes
| % toplevel .top1 -use [winfo id .f1] -background red
| % bind .top1 <Destroy> "puts {DESTROY .top1}"
| % pack [frame .top1.f2 -container 1] -fill both -expand yes
| % toplevel .top2 -use [winfo id .top1.f2] -background green
| % bind .top2 <Destroy> "puts {DESTROY .top2}"
Make both bindings use %W to see which widget exactly gets the event:
bind .top1 <Destroy> "puts {DESTROY top1/%W}"
bind .top2 <Destroy> "puts {DESTROY top2/%W}"
=>
destroy .top2
DESTROY top2/.top2
DESTROY top1/.top1.f2
So, destroying .top2 alse destroys .top1.f2, but not .top1.
I have not checked the details of -container and -use, so I can't
comment on whether that is to be expected...
R'
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 915 |
Nodes: | 10 (2 / 8) |
Uptime: | 44:28:35 |
Calls: | 12,170 |
Files: | 186,521 |
Messages: | 2,234,564 |