Tkinter- Possibly a basic question
russblau at hotmail.com
Wed Jul 30 23:55:03 CEST 2008
<joshdw4 at gmail.com> wrote in message
news:59dee72b-3fb6-414b-ab49-33cab8f9c9e8 at 26g2000hsk.googlegroups.com...
>I hate to do this, but I've thoroughly exhausted google search. Yes,
> it's that pesky root window and I have tried withdraw to no avail. I'm
> assuming this is because of the methods I'm using. I guess my question
> is two-fold.
> 1) How do I get rid of that window?
> 2) Any comments in general? I am just learning python (and coding with
> classes), so I'm sure there are things I should pound into my head
> before I learn bad habits.
At the risk of overlooking something obvious, why don't you make your
App class a subclass of Tkinter.Frame instead of Tkinter.Toplevel, and
just pack it into the root window instead of worrying about how to get rid
of the root window? Just delete "root.withdraw()" and then add "a.pack()"
More information about the Python-list