[Tkinter-discuss] Basic Tkinter help

Ru-D red_haired_freak at hotmail.com
Thu Jan 22 02:39:33 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)
app.state("zoomed")
app.title("Title")

root.mainloop()

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

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



More information about the Tkinter-discuss mailing list