Frame doesn't fill up after resize. 
Author Message
 Frame doesn't fill up after resize.

This seems to be simple, but I'm still not quit sure how resize works.

With 3 labelframe, I configure the top and bottom (.lf1 and .lf3)
labelframe with "-fill both". The middle frame (.lf2) is configured
with "-fill x" as I don't want it to expand in vertical direction.

When I resize window, there's always a blank space between .lf2 and
.lf3

Why .lf3 does not fill up the blank space as it is configured to fill
both direction and anchor to nw?

May be this is not the right way to do this, is there another way to
accomplish the same effect?

Thanks.
-----------------------------------------------------
labelframe .lf1 -text "Frame1"
labelframe .lf2 -text "Frame2"
labelframe .lf3 -text "Frame3"

pack .lf1 -side top -fill both -expand yes -anchor nw
pack .lf2 -side top -fill x    -expand yes -anchor nw
pack .lf3 -side top -fill both -expand yes -anchor nw

text .lf1.text -height 5
text .lf2.text -height 3
text .lf3.text -height 5

pack .lf1.text -fill both -expand yes
pack .lf2.text -fill x    -expand yes
pack .lf3.text -fill both -expand yes
-----------------------------------------------------



Fri, 15 Feb 2008 18:06:10 GMT  
 Frame doesn't fill up after resize.
"Wirot L." a crit :

Quote:

[...]
> May be this is not the right way to do this, is there another way to
> accomplish the same effect?

You have just to change an "expand" option:

Quote:
> -----------------------------------------------------
> labelframe .lf1 -text "Frame1"
> labelframe .lf2 -text "Frame2"
> labelframe .lf3 -text "Frame3"

> pack .lf1 -side top -fill both -expand yes -anchor nw
> pack .lf2 -side top -fill x    -expand yes -anchor nw

                                         ^
pack .lf2 -side top -fill x    -expand no -anchor nw

Quote:
> pack .lf3 -side top -fill both -expand yes -anchor nw

> text .lf1.text -height 5
> text .lf2.text -height 3
> text .lf3.text -height 5

> pack .lf1.text -fill both -expand yes
> pack .lf2.text -fill x    -expand yes
> pack .lf3.text -fill both -expand yes
> -----------------------------------------------------

HTH
--
Pascal


Fri, 15 Feb 2008 19:19:57 GMT  
 Frame doesn't fill up after resize.
That works. I reall miss that expand. Thank you :)


Sat, 16 Feb 2008 00:18:35 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Removing widgets from frames, why frames don't resize to 0x0

2. Tkinter, Frame option 'fill'

3. fill -both doesn't work

4. C5b: Report, Page header doesn't resize properly

5. listbox doesn't resize with contents

6. resizable doesn't prevent resizing

7. Now it resizes, now it doesn't---geometry manager problems in Tk4.x

8. 'Clearing' frame doesn't resize it

9. Driver doesn't support transaction framing

10. BWidget scrollable frame scrollbar doesn't update

11. tkdesk on fedora core 5 -- doesn't run, doesn't compile

12. BLT installs but doesn't work, and TkTable doesn't build

 

 
Powered by phpBB® Forum Software