LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 02-12-2005, 05:08 AM   #1
Ephracis
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.

Code:
#!/usr/bin/wish
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
Ephracis
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.

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?
 
Old 02-12-2005, 04:51 PM   #3
puedo
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
cetialphav
Member
 
Registered: Sep 2003
Location: Raleigh, NC, USA
Distribution: Fedora
Posts: 88

Rep: Reputation: 16
Try this:

Code:
pack .top -fill both -expand true
 
  


Reply


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


All times are GMT -5. The time now is 07:35 PM.

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