in reply to auto sizing TK Scrolled box

If you want to use the pack geometry manager, you need to pack both the widget and it's container (if it isn't a top level) with -expand => 'true' (for any value of true) and -fill => 'both'.

use warnings; use strict; use Tk; my $mw = Mainwindow->new; my $frame = $mw->Frame->pack(-expand => 1, -fill => 'both'); my $text = $frame->Scrolled('Text', -scrollbars => 'se', )->pack(-expand => 1, -fill => 'both'); MainLoop;