$widget->reqheight #requested height $widget->height #actual height $widget->reqwidth #requested width $widget->width #actual width #### use Tk; use Tk::Pane; use strict; use warnings; my $Window = MainWindow->new(); $Window->geometry("+0+0"); # start in upper left corner of display my $sframe = $Window; my $scroll = $sframe->Scrolled('Pane', -sticky => 'news', -scrollbars => 'se', ); $scroll->pack(-expand => 1, -fill => 'both');; my $total_row_width = 0; foreach my $row (0..9) { my $row_frame = $scroll->Frame()->pack(-side=>'top',-fill=>'x'); $total_row_width = 0; foreach my $col (0..12) { my $this_entry =$row_frame -> Entry(-text => "Whatever $row,$col", -width => 12)->pack(-side => 'left'); my $width_this_widget = $this_entry->reqwidth; $total_row_width += $width_this_widget; } #print "width in pixels this row of widgets: $total_row_width\n"; } my $fudge = 20; print "total row width = $total_row_width\n"; $Window->minsize($total_row_width + $fudge,300); MainLoop;