[Tutor] Absolute and relative window sizes

andy surany mongo57a@comcast.net
Sun Oct 27 15:09:02 2002


This is a multi-part message in MIME format.

--Boundary_(ID_CosFbZKXNYz43HGGZT8Tfw)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

Hi all,

I've created a GUI (Tk) that uses a single frame. The application starts with just a menu (menubar). Without any size controls, the initial display is very small and the menu is "word wrapped" based on available space. I experimented with expand and fill options to no avail, and was finally forced to give the window absolute size controls, as in:

 Frame.__init__(self,  parent, width=700, height=500)

Now this worked great! - that is, until now. I've augmented the application with a scrolled list where the contents exceed my hard coded dimensions. The result is a huge "gray space" where the menu is located, and then a correctly sized widget (listbox). I tried changing the initial hard dimensions to accommodate this listbox, but it just is not working.

Now I know that I have controls set to make the widget expand based on the data (expand=YES, fill=BOTH) - and I would like to continue to use relative (data based) window sizes - rather than from an absolute perspective. All of my Listbox applications work great using relative size/position controls - but the menubar doesn't seem to abide by these rules.....

Anybody recommend how I should handle this situation?

TIA.



--Boundary_(ID_CosFbZKXNYz43HGGZT8Tfw)
Content-type: text/html; charset=iso-8859-1
Content-transfer-encoding: 7BIT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi all,</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>I've created a GUI (Tk) that uses a single frame. The 
application starts with just a menu (menubar). Without any size controls, the 
initial display is very small and the menu is "word wrapped" based on available 
space. I experimented with expand and fill options to no avail, and was finally 
forced to give the window absolute size controls, as in:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;Frame.__init__(self,&nbsp; parent, width=700, 
height=500)</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Now this worked great! - that is, until now. I've augmented 
the application with a scrolled list where the contents exceed my hard coded 
dimensions. The result is a huge "gray space" where the menu is located, and 
then a correctly sized widget (listbox). I tried changing the initial hard 
dimensions to accommodate this listbox, but it just is not working.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Now I know that I have controls set to make the widget expand 
based on the data (expand=YES, fill=BOTH) - and I would like to continue to use 
relative (data based)&nbsp;window sizes - rather than from an absolute 
perspective. All of my Listbox applications work great using relative 
size/position controls - but the menubar doesn't seem to abide by these 
rules.....</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Anybody recommend how I should handle this 
situation?</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>TIA.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV></BODY></HTML>

--Boundary_(ID_CosFbZKXNYz43HGGZT8Tfw)--