Again - sorry for the top post.. I'm not completely sure of what you want, but I think you want some sort of "bar" down the left side. You have to turn the expand option to off for that to "not" allocate anymore space in the x direction on a resize. Otherwise the packer will split it 50/50 with the righthand frame.
This will do what I describe - which is yet to be decided what you really want: ############################# use Tk; use strict; my $mw=tkinit; my $mainFrame = $mw->Frame()->pack(-expand=>1, -fill => 'both'); my $frameLeft = $mainFrame->Frame( -bg=>'red',-borderwidth => 1, -width => 50, )->pack( -side => 'left', -expand => 0, -fill => 'y'); my $frameRight = $mainFrame->Frame( -bg=>'yellow', -borderwidth => 1, )->pack( -side => 'left', -expand => 1, -fill => 'both'); MainLoop; ############################# Suggestion..it would be easier to help if you provided fully working programs that show the problem as opposed to code snippets (which had some typos). Jack ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Daniel Burgaud Sent: July-31-09 4:52 AM To: Perl-Win32-Users Subject: problem with Tk Frame not filling the whole frame. Hi, I have a Frame and within this Frame, I have 2 more Frames: $mainFrame = $mw->Frame()->pack(-expand=>1, fill = 'both'); $frameLeft = $mainFrame->Frame( -borderwidth => 1, width => 50, )->pack( -side => 'left', -expand => 1, -fill => 'y'); $frameRight = $mainFrame->Frame( -borderwidth => 1, )->pack( -side => 'right', -expand => 1, -fill => 'both'); How come the sub frames isnt filling the whole mainFrame? Why? What option/method must I use to force these two sub frames to fill the mainFrame? I also tried it within a Notebook (instead of main Frame) with same effect: $mainFrame = $TK{'notebook'}->add('item', -label => ' Main Frame '); $frameLeft = $mainFrame->Frame( -borderwidth => 1, width => 50, )->pack( -side => 'left', -expand => 1, -fill => 'y'); $frameRight = $mainFrame->Frame( -borderwidth => 1, )->pack( -side => 'right', -expand => 1, -fill => 'both'); Need Help. Thanks! Dan _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
