Closing Toplevel windows

S

Scott Holmes

I'm trying to determine best practices as well as learn basic coding
syntax. I wish to open an input screen to view/enter data. The screen
also requires a menu. This is part of the code I have so far:

import Tkinter
import tkMessageBox
import Pmw
import wcgc_pg

class calendarWindow:
def __init__(self, parent):
megaToplevel = Pmw.MegaToplevel(parent, title = 'Calendar Program')
toplevel = megaToplevel.interior()
self.balloon = Pmw.Balloon(toplevel)

menuBar = Pmw.MainMenuBar(toplevel,
balloon = self.balloon)
toplevel.configure(menu = menuBar)
self.menuBar = menuBar
...

This is basically code taken from the Pmw demos. What I wish to
determine now is how to close this window from a menu option and/or a
button. Neither withdraw() nor deactivate() work.

Thanks...
--
---------------------------------------------------------------------
Scott Holmes http://sholmes.ws
http://pages.sbcglobal.net/scottholmes
(e-mail address removed)

Independent Programmer/Analyst Passport 4GL
PHP HTML Composer PostgreSQL Informix 4GL, SQL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top