#!/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;