I was able to see the resizing problem you described (using darwin, Perl 5.8.8, Tk 804.028). It stopped It became (or remained?) unpredictable when I changed the values assigned to the -command parameters in the widget creations.

Instead of this (whitespace adjusted for legibility):

my $DoButton = $mode_buttons->Button( -text => 'Continue', -command => sub {&do_setup()} )->pack (-side => 'left', -expand => 1);
Try it like this:
my $DoButton = $mode_buttons->Button( -text => 'Continue', -command => \&do_setup ### provide a code_ref, not anon_ +sub )->pack (-side => 'left', -expand => 1);
Also, wherever you had this:
... -command => sub {&getTool();&CleanUp();},
I would replace it with:
... -command => sub {getTool();CleanUp();}, ### drop the "&"
just on general principles.

I'm not sure I can explain why the difference seems to matter, but I should have known that such a change would just be cosmetic -- no reason it should affect behavior -- but still, wherever a -command parameter is simply supposed to invoke a sub with no args, the value of that parameter should be the code_ref that points to that sub.

And whenever you need to pass args to the subroutine, provide an anon.array containing the code ref and the args:

... -command => [ \&func_name, $arg1, $arg2 ],

UPDATE: NEVERMIND! This is stranger than I thought -- the behavior I'm getting is not actually following a pattern yet. I'm seeing alternations between "resizes as intended" and "shrinks to unusable size". Perhaps someone else will figure it out while I'm struggling with this...


In reply to Re: Problems after upgrading both Perl and Tk by graff
in thread Problems after upgrading both Perl and Tk by monksp

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.