I think I found your problem, you have to define a frame for each "Model File" and "Range File" lines and make them to pack to the top and fill 100% the x axis, then within the frames you add all components justified to the left

# CREATE MODEL FILE FRAME my $model_info_frame = $mw->Frame->pack( -side => "top", -fill => 'x' +); # Label $model_info_frame->Label( -text => "Model File : " )->pack( -side => " +left" ); # Input field $model_info_frame->Entry( -width => 60, -textvariable => \$filename )->pack( -side => "left" ); # Browse files button $model_info_frame->Button( -text => "...", -command => sub { $filename = $mw->getOpenFile( -title => 'File Browser' ); } )->pack( -side => "left" ); # CREATE RANGE FILE FRAME my $range_info_frame = $mw->Frame->pack( -side => "top", -fill => 'x' +); # Label $range_info_frame->Label( -text => "Range File : " )->pack( -side => " +left" ); # Input field $range_info_frame->Entry( -width => 60, -textvariable => \$filename )->pack( -side => "left" ); # Browse files button $range_info_frame->Button( -text => "...", -command => sub { $filename = $mw->getOpenFile( -title => 'File Browser' ); } )->pack( -side => "left" );

your code has mixed syntax like grid and pack, use grid to define layouts based on rows and columns


In reply to Re: problems with frame widgets of tk by bluescreen
in thread problems with frame widgets of tk by gibsonca

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.