Perl/Tk resizing windows etc

I have just started trying to learn perl/tk

I have the following code ...

require Tk;
use Tk;
my $main = MainWindow->new();

my $lr_frame = $main->Frame(-background=>'cyan')->pack(-side=>'top',-fill=>'both');

my $left_box = $lr_frame->Scrolled('Text',
                                   )->pack(-side=>'left',-fill=>'both', -expand=>1);

my $right_box = $lr_frame->Scrolled('Text',
                                   )->pack(-side=>'left', -fill=>'both',  -expand=>1);


so basically when I run the above  I get two textbox .. which does look as if both has 50% of the window share ..
but when I maximize the window it doesnt look like that one textbox is larger than the other ..How can I ensure that both textboxes are of the same size ?

also any pointers/urls to good online perl/Tk tutorials  would be appreciated

LVL 11
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

#! /usr/local/bin/perl -w
use Tk;

my $main = MainWindow->new();

my $lr_frame = $main->Frame(-background=>'cyan')->pack(-side=>'top',-fill=>'both');

my $left_box = $lr_frame->Scrolled('Text', -scrollbars=>'oe',);
my $right_box = $lr_frame->Scrolled('Text', -scrollbars=>'oe',);

# Use Grid
$left_box->grid( -in => $lr_frame, -row=>1,-column => '1', -sticky => 'nesw' );
$right_box->grid( -in => $lr_frame, -row=>1,-column => '2', -sticky => 'nesw' );

$lr_frame->gridRowconfigure(1, -weight=>1, -minsize =>50 );
$lr_frame->gridColumnconfigure(1, -weight=>1, -minsize =>50 );
$lr_frame->gridColumnconfigure(2, -weight=>1, -minsize =>50 );


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
avizitAuthor Commented:
Thanks for the links nicholassolutions
ITcrow , your solution works fine , but any idea if the same can be done using "pack" . I will wait for a day more if any more suggestions comes , else I will split the points amongts you two.

Thanks ,

Hello Abhi,

Pack doesn't really give very well defined mechanism to get full control on GUI. The method I proposed gives you full control on how and where you want to place your GUI elements.

avizitAuthor Commented:
Thanks ITcrow , seems like now i have to start looking at grids ..luckily i have just started .. so not much harm done :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.