foxcorner has asked for the wisdom of the Perl Monks concerning the following question:
I have a hierarchy something like this (not completely represented here, of course):
MainWindow Frame on left Frame at top Label Frame Labels... Frame at bottom Label Frame Labels... Frame on right
Pretty much all geometry managament is Form. (I come from a Motif background :-) ).
The problem is that the width of "Frame on left" is set by the contents of the FIRST child frame, "Frame at top". This means that if any of the texts of the labels in "Frame at bottom" are longer than the longest label in "Frame at top", they get truncated.
These texts do indeed vary, so it's not possible to fix it by, say, swapping "Frame at top" with "Frame at bottom".
So, what I'm looking for is a way to tell something high in my hierarchy (probably "Frame on left") to resize once "Frame at bottom" becomes populated. Or put another way, simply to resize when all the children have been realized (there's my Motif background coming through...!).
I've tried using -fill, -width (though I'd rather not hard-wire it); and I've thought about using other geometry managers, though I'm rather attached to Form. (attached, geddit? haha). Maybe Form's springs would help?
Any ideas? I've run out.
Thanks,
Dan (foxcorner)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk container size question
by aquarium (Curate) on Oct 13, 2004 at 21:22 UTC | |
by foxcorner (Initiate) on Oct 13, 2004 at 21:58 UTC | |
|
Re: Tk container size question
by qumsieh (Scribe) on Oct 14, 2004 at 03:16 UTC | |
by foxcorner (Initiate) on Oct 14, 2004 at 14:35 UTC | |
by qumsieh (Scribe) on Oct 14, 2004 at 21:13 UTC | |
by foxcorner (Initiate) on Oct 15, 2004 at 15:38 UTC |