Hi Tk/Monks,

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)


In reply to Tk container size question by foxcorner

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.