Hi all,

I have this little Tk-App that basically consists of two frames, with a vertical adjuster in between them.
#!/usr/local/bin/perl -w use Tk; use strict; require Tk::TFrame; require Tk::Adjuster; my ( $mw, $frmLeft, $adjMiddle, $frmRight, ); $mw = MainWindow->new(-title => 'foo'); $frmLeft = $mw->TFrame ( label => [-text => 'links'] )->pack (-expand => 1, -fill => "both", -side => 'left'); $adjMiddle = $mw->Adjuster ( -widget => $frmLeft, -side => 'left', -restore => 1, )->pack (-side => 'left', -fill => 'y'); $frmRight = $mw->TFrame ( label => [-text => 'rechts'] )->pack (-expand => 1, -fill => "both", -side => 'right'); MainLoop;
Start the above program and you'll note the two frames are equally wide. If you now maximize the window, you'll notice that the left frame stays small while the right frame grows. That's not what I want. I'd prefer that both frames would grow/shrink relative to the growth of the main window.

I tried catching the "Expose" event and use that to resize the left frame manually, but the -width property for the main window always returns zero.


holli, /regexed monk/

In reply to Tk::Adjuster, how to keep proportions by holli

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.