Its been years since I fiddled with Tk, but you may find this helpful, $widget->packForget() method. There is also a @list = $widget->packInfo( ); method. I am not sure if the link I found with google is a "legal" open source book, but you can some google yourself. I am thinking that since "pack" worked the first time, if you make it "forget" and start over, you will get a result the second time, like the first time.

Update: struck this because I see the forget method now and I am lost. Sorry for the bandwidth waste. However, packInfo() may hold some promise..

Update 2: First, most excellent demo program! I am using Active State 5.20 and all I needed to do was install Tk via the ppm (Perl Package Manager) GUI. With my version, yes, the panels get resized when switching between modes. But of course the user can easily move the adjuster back to "where it was". Of course that is a hassle! I did not see any other functional problems, just user inconvenience and annoyance.

I tried a lot of things including getting packInfo() and trying to use that for the re-pack but that didn't pan out for me. Oops. I am wondering now in a speculative way that repacking $list in the "list only view" to expand it somehow changes it so that it can't repack in the same way like it did before with the other objects? One completely untested but perhaps an idea to test, is to "forget" all the objects:list,adjuster,ROtext. Make a new list object, $list2 and use that to pack into the now "list only" panel. To go back, forget that $list2 object and re-pack the 3 objects that haven't been mucked with? This problem is not so easy, but your demo is excellent.

One extremely minor problem that you've probably already seen, there is one place where there is  ipadx => 3, should be -ipadx, but this is just a non-consequential error.


In reply to Re: Issue packing a Tk::Adjuster by Marshall
in thread Issue packing a Tk::Adjuster by jbuck

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.