[Tutor] Tkinter packing confusion

Terry Carroll carroll at tjc.com
Tue Dec 28 08:45:16 CET 2004


On Mon, 27 Dec 2004, Terry Carroll wrote:

> The program logic works, but I'm totally lost on the pakcer layout 
> manager.  

Never mind; I'm an idiot.

>         self.F=tk.Frame(top)
> 
>         fBaseURL=tk.Frame(self.F)
>         lBaseURL=tk.Label(self.F, text="URL:")
>         eBaseURL=tk.Entry(textvariable=self.tvDefaultBaseURL)

This is my problem.  I created the fBaseURL Frame, but never used it.  The 
last two lines should read:

>         lBaseURL=tk.Label(fBaseURL, text="URL:")
>         eBaseURL=tk.Entry(fBaseURL, textvariable=self.tvDefaultBaseURL)

No wonder it not only didn't pack the way I expected, but that no
variation in the pack() calls would fix it.  I was putting the widgets
directly into the master frame.




More information about the Tutor mailing list