$mw->bind('', \&Window_Resize); #### #!/usr/bin/perl use lib 'C:\MyPerlLib'; use Tk; use Tk::Pane; my $i = 0; my $mw = MainWindow->new( -title => "SACL Survey" ); my $pane = $mw->Scrolled(qw/Pane -scrollbars osw/)->grid(); my $label=$mw->Label( -text => "... ..." )->grid(); for (1..30) { $pane->Radiobutton( -text => "1", -value => "1", -justify => "left", -variable => \${"rb1_q$_"}, )->grid( $pane->Radiobutton( -text => "2", -value => "2", -justify => "left", -variable => \${"rb2_q$_"}, ), $pane->Radiobutton( -text => "3", -value => "3", -justify => "left", -variable => \${"rb3_q$_"}, ), $pane->Radiobutton( -text => "4", -value => "4", -justify => "left", -variable => \${"rb4_q$_"}, )); } $mw->bind('', \&Window_Resize); MainLoop; sub Window_Resize { my $e = $mw->XEvent; return if !$e; my $mww=$mw->width; my $mwh=$mw->height; $pane->place( -height => $mwh-30, -width => $mww-20); $label->place(-y=>$mwh-20,-x=>$mww/2-70); }