En Sat, 24 Oct 2009 23:59:06 -0300, linda.s <samrobertsm...@gmail.com> escribió:

When I click "quit" button, why the following code has problem?

[...]

if __name__ == '__main__':
    root = Tk()
    gridbox(Toplevel())
    packbox(Toplevel())
    Button(root, text='Quit', command=root.quit).pack()
    mainloop()

If you run the code from inside IDLE, you'll have to add this line at the end:

    root.destroy()

as explained here:

http://www.effbot.org/tkinterbook/tkinter-hello-again.htm

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to