in reply to Re^7: perltk autoresize following users resize
in thread perltk autoresize following users resize

Your second sentence was
The mainwindow will automatically pack itself to the smallest size that will show everything.
And really that is exactly what I want it to do again. Before the user messes with the window size, it seems to automatically pack itself to the smallest size that shows all when pack and unpack the frames in the labeledframe. But once the user touches it, that stops. I just want to turn that back on or have a way to do that manually.

In my searching I just found that Tcl/TK has a function called fitToContents, but I can't find anything like that in perl/tk

Randell
  • Comment on Re^8: perltk autoresize following users resize

Replies are listed 'Best First'.
Re^9: perltk autoresize following users resize
by zentara (Cardinal) on Aug 21, 2008 at 11:50 UTC
    Yeah, I see. My best guess is to save the minimum geometry needed, and set it everytime A is selected. I guess if you wanted perfect fitting everytime, you could loop thru all the widgets, get their reqwidth and reqheight, sum them up with a small fudge factor added for padding, then set your mainwindow geometry to that.

    Personally, I think the scrolled Pane is the best. Let the Scrolled Pane do all the expansion/contraction for you.


    I'm not really a human, but I play one on earth Remember How Lucky You Are
      odd question...
      you said to post to comp.lang.perl.tk newsgroup
      Is that the same as the google group?
      Assuming it isn't... how do I post to that. A google search turned up the FAQ a bazillion times, but not that actual newsgroup...

      Randell
        comp.lang.perl.tk thru google-groups But I see your post in there.

        Just for your information, newsgroups are knd of like email servers, you need a program that can access the nntp protocol ( as compared to http ). Google has a gateway thru the web, but you can get a full fledged newsgroup program, and set it up. I use Agent, which runs on linux under Wine, as well on it's native Windows. Linux also has the Pan newsreader.

        You can even use Perl scripts.....nntp


        I'm not really a human, but I play one on earth Remember How Lucky You Are