[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Tkinter, grid, in_: widget definition order significant ?!
From:       Sorin Schwimmer <sxn02 () yahoo ! com>
Date:       2006-07-04 16:08:45
Message-ID: 20060704160845.30856.qmail () web32906 ! mail ! mud ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

Working on my current project, I discovered the following behaviour: a widget defined \
before the window in which I try to grid it won't show up, but will take space and \
behave like it is there (blind typing proves it). A widget defined after the griding \
window will come up fine. The following example illustrates my point:

<code>
from Tkinter import *

r=Tk()
l1=Label(r, text='first label')
f=Frame(r)
f.grid()
l1.grid(in_=f, row=0)
l2=Label(r, text='second label')
l2.grid(in_=f, row=1)
</code>

On my system (Gentoo Linux, Python 2.4.1) l1 (defined before f) takes spaces, but is \
invisible, while l2 (defined after f) is OK.

That's the way it is intended to be? How would I grid stuff in dynamically created \
windows?

Thanks for your advice,
Sorin Schwimmer

 		
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.


[Attachment #5 (text/html)]

Hi,<br><br>Working on my current project, I discovered the following behaviour: a \
widget defined before the window in which I try to grid it won't show up, but will \
take space and behave like it is there (blind typing proves it). A widget defined \
after the griding window will come up fine. The following example illustrates my \
point:<br><br>&lt;code&gt;<br>from Tkinter import *<br><br>r=Tk()<br>l1=Label(r, \
text='first label')<br>f=Frame(r)<br>f.grid()<br>l1.grid(in_=f, row=0)<br>l2=Label(r, \
text='second label')<br>l2.grid(in_=f, row=1)<br>&lt;/code&gt;<br><br>On my system \
(Gentoo Linux, Python 2.4.1) l1 (defined before f) takes spaces, but is invisible, \
while l2 (defined after f) is OK.<br><br>That's the way it is intended to be? How \
would I grid stuff in dynamically created windows?<br><br>Thanks for your \
advice,<br>Sorin Schwimmer<br><p>&#32;  <hr size=1>How low will we go? Check out \
Yahoo! Messenger’s low <a \
href="http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com"> \
PC-to-Phone call rates.



-- 
http://mail.python.org/mailman/listinfo/python-list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic