-   Programming (
-   -   Tcl/tk: Stretch a frame over the whole window (

Ephracis 02-12-2005 06:08 AM

Tcl/tk: Stretch a frame over the whole window
I want to make my frame ".top" to go over the whole window. So it fills the window even if the user changes the size of it during runtime.


wm geometry . 500x400
frame .top -background blue
grid .top -sticky "nswe"

What do I need to change?

Ephracis 02-12-2005 09:48 AM

I have now succeded in making the frame stretch horizontal over the window.


wm geometry . 500x500
frame .top -background blue
pack .top -fill x

If I change the -fill in the last line to "y" or "both" it remains the same. I can't get it to stretch vertical.

This should be a simple task, but is there anyone that know how to program tcl/tk?

puedo 02-12-2005 05:51 PM

frame has height and width attributes that are given in screen units.
perhaps (I haven't tried this) you could give it a very big value and see what happens?

cetialphav 02-12-2005 09:53 PM

Try this:


pack .top -fill both -expand true

All times are GMT -5. The time now is 07:42 AM.