LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Tcl/tk: Stretch a frame over the whole window (http://www.linuxquestions.org/questions/programming-9/tcl-tk-stretch-a-frame-over-the-whole-window-289228/)

Ephracis 02-12-2005 05: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.

Code:

#!/usr/bin/wish
wm geometry . 500x400
frame .top -background blue
grid .top -sticky "nswe"

What do I need to change?

Ephracis 02-12-2005 08:48 AM

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

Code:

#!/usr/bin/wish
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 04: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 08:53 PM

Try this:

Code:

pack .top -fill both -expand true


All times are GMT -5. The time now is 06:46 AM.