in reply to perl tk [frame resize]
I think when you pack your widget into the frame, you also have to allow -expand option. Here is continuation of code that packed a scrolled TableMatrix into that frame. Scrolled doesn't have any thing to do with whether you can re-size or not, that is a separate idea.my $table_frame = $mw->Frame (-height=>'10', -width=>'30', -relief=>'groove', -borderwidth=>'3' )->pack( -expand=>1, -fill=>'both', -pady=>'0' );
$table = $table_frame->Scrolled('TableMatrix', -cols => scalar(@col_head), -rows =>16, #fixed number of rows!!! need to grow this dynamically! -titlerows => 1, -variable => $tMain, -state => 'disabled', # no direct editing of cells -resizeborders => 'col', -bg => 'white', -rowheight => 1, #make row display more compact.... -bd => [0,1,0,1], -justify => 'left', -drawmode => 'compatible', -wrap => 0, -relief => 'solid', -scrollbars=>'se', -exportselection =>0, )->pack(-expand =>1, -fill=>'both'); $table->rowHeight(0,2); #varies height of title row (0) $table->tagRow('title',0); $table->tagConfigure('title', -bd=>2, -relief=>'raised');
|
|---|