in reply to how to scroll a mainwindow in TK

Another option is to pack the buttons into a Pane inside the main window. A benefit to this is you can make just a portion of the window scrollable if you should so desire.

use warnings; use strict; use Tk; use Tk::Pane; my $top = MainWindow->new; my $pane = $top->Scrolled('Pane', -scrollbars => 'e', )->pack(-expand => 'y', -fill => 'both'); for (0 .. 9) { $pane->Button( -text => $_, -width => 15, -command => [sub{print "Button $_[0] Pressed\n"},$_], )->pack; } $top->Button( -text => 'Quit', -command => sub{$top->destroy}, )->pack; MainLoop;