How can I find my invisible windows when using the packer?
|
| |
The situation: A window is created, say `.w1`, followed by another
window, say `.w2`. The command `pack .w1 -in .w2` is used to pack `.w1`
inside of `.w2`. The `pack` command completes successfully, and `pack
info .w1` indicates that things are as expected. However, `.w1` isn`t
visible! Where is it?
button .w1 -text Hello; # create .w1
frame .w2; # create .w2
pack .w1 -in .w2; # pack .w1 inside .w2
pack .w2; # pack .w1 in main window
# where`s the button?
The explanation: (based on a posting by js@aelfric.bu.edu (Jay Sekora))
The short answer is `raise .w1`. In the example `.w1` is positioned
properly inside `.w2`, and all the sizing glue that lets `.w1` and `.w2`
adjust their sizes based on each other will work, but `.w1` is
underneath `.w2`, because windows are stacked in the order they are
created in, by default. You can change the stacking order explicitly
with the `raise` command, in this case `raise .w1`.
|
|
|