I can't believe i'm stumped on this

ok .. main menu again ..... nice fat quit button .. works great
quit = Button(root, text = 'Quit', command = root.quit)

awesome work hey ....

i also have an about window (cleverly called awin) .. click it .. it tell you things .... it has a close button ... if you use the same code .. and you click close .. the whole program exits .. Hahahahah i think, i'm smarter than that .. so i change the code

aquit = Button(awin, text = 'Close', command = awin.quit)

but but .. the whole program still closes. I have been looking for hours and i swear i cannot find a piece of code where someone opened a small about windows in tkinter and it had some type of close button, i mean every program i've ever used ..... ok ok .. i'll calm down.

OK .. so what is the ONE word i am looking for so my awin box closes and not my whole program when i click close?

Sorry .. but THANKS! :)

I'm not sure if tkinter has changed in py30 and above but shouldn't you be using awin.destroy ?

You sir - are my new hero, i couldn't find that documented ... and yes .. it's me not you :)

Thanks a million mate


To make a short story long, 'quit' will quit the tcl interpreter of Tkinter! Replace 'quit' with 'destroy' to destroy a particular window in a multiwindow program.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.