Tkinter. Why the Need for a Frame, or no Frame?

Eric Brunel see.signature at no.spam
Mon Feb 18 11:53:24 CET 2008


On Sun, 17 Feb 2008 13:31:47 +0100, W. Watson <wolf_tracks at invalid.com>  
wrote:
> Thanks very much. I'm somewhat new to this, but I would think that Frame  
> might carry some properties not available to the root. If so, then there  
> might be some advantage to it.

(Please don't top-post... It makes the individual messages very hard to  
read. Thanks.)

In fact, it's exactly the reverse: the root or the instances of Toplevel  
have some properties that are not available to frames, for example the  
ability to have a menu bar. As already said, frames are only used to group  
widgets to do complicated layouts. In the example you gave, the frame is  
unneeded, and I'd say it should not be there (the only thing it achieved  
was just to confuse you...).

HTH
-- 
python -c "print ''.join([chr(154 - ord(c)) for c in  
'U(17zX(%,5.zmz5(17l8(%,5.Z*(93-965$l7+-'])"



More information about the Python-list mailing list