Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 02-12-2005, 05:08 AM   #1
Senior Member
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 49
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?
Old 02-12-2005, 08:48 AM   #2
Senior Member
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Original Poster
Rep: Reputation: 49
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?
Old 02-12-2005, 04:51 PM   #3
LQ Newbie
Registered: Feb 2005
Location: Texas USA
Distribution: Fedora
Posts: 4

Rep: Reputation: 0
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?
Old 02-12-2005, 08:53 PM   #4
Registered: Sep 2003
Location: Raleigh, NC, USA
Distribution: Fedora
Posts: 88

Rep: Reputation: 16
Try this:

pack .top -fill both -expand true


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
abiword window frame resizing bm1 Slackware 2 11-04-2004 01:44 AM
stretch xorg display? shanenin Linux - Software 5 11-02-2004 02:12 PM
calling a frame from another frame : JAVA randomx Programming 0 10-07-2004 02:49 PM
application buttons dont stretch on taskbar xconspirisist Fedora 1 11-10-2003 03:20 AM
Making the background stretch to fill your desktop in fluxbox ShibbyLinux Linux - General 2 04-11-2002 07:37 PM > Forums > Non-*NIX Forums > Programming

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration