I'm not sure exactly what you want, but it sounds like you are looking for a Tk::Adjuster. See Tk::Adjuster, how to keep proportions for maintaining ratios. Here is a simple example with no ratio.
#!/usr/bin/perl
use warnings;
use strict;
use Tk;
use Tk::Pane;
my $mw = MainWindow->new();
my $pane = $mw->Scrolled('Pane',
-sticky => 'nsew',
-scrollbars => 'osoe',
)->pack(-fill => 'both',-expand => 1);
my $i;
for ($i = 0; $i <= 5; $i++){
my $frame = $pane->Frame(
-relief => 'ridge',
-bd => 1,)
->pack(-side => 'top',-fill => 'both',-expand => 1);
my $adjust = $pane->Adjuster();
$adjust->packAfter($frame, -side => 'top',-fill=>'both',-expand=>1);
my $label = $frame->Label(-width => 30,
-text => "Frame ". $i,)->pack();
}
my $frame = $pane->Frame(
-relief => 'ridge',
-bd => 1,)
->pack(-side => 'top',-fill => 'both',-expand => 1);
my $label = $frame->Label(-width => 30,
-text => "Frame 6 ")->pack();
MainLoop;
|