my ($col, $row) = $graph_pane->{'SubWidget'}->{'scrolled'}->gridSize( ); #### #!/usr/bin/perl -w use strict; use warnings; use Tk; use Tk::Pane; my $mw = MainWindow->new; my $graph_pane = $mw->Scrolled('Frame', -scrollbars => 'osoe', )->pack( -fill => 'both', -expand => 1, ); for my $i (0 .. 2){ for my $j (0 .. 3){ my $c=$graph_pane->Canvas( -width => 250, -height => 100, -background => 'white', )->grid( -row => $i, -sticky => "nsew", -column => $j, ); $c->createText(10,10, -text => $i . ',' . $j, -font => "{Arial} 8 bold", ); } } my ($col, $row) = $graph_pane->{'SubWidget'}->{'scrolled'}->gridSize( ); warn($col); warn($row); MainLoop;