[Tkinter-discuss] Basic Tkinter help

Ru-D red_haired_freak at hotmail.com
Thu Jan 22 02:44:37 CET 2009

I am relatively new to Tkinter and am finding some simple problems difficult
to understand/rectify

The following code displays two windows; my maximised application window and
a small window called Tk:

from Tkinter import *

class APP(Toplevel):
    def __init__(self, master):
        Toplevel.__init__(self, master)
        self.master = master
root = Tk()
app = APP(root)


I can fix this by inserting the line root.withdraw() after root = Tk() but
this seems like a clumsy solution to me. Could someone please help me
understand why two windows are being made and suggest a better way to do

View this message in context: http://www.nabble.com/Basic-Tkinter-help-tp21593741p21593741.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.

More information about the Tkinter-discuss mailing list