Closing Toplevel windows

Discussion in 'Python' started by Scott Holmes, Aug 1, 2003.

  1. Scott Holmes

    Scott Holmes Guest

    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


    Independent Programmer/Analyst Passport 4GL
    PHP HTML Composer PostgreSQL Informix 4GL, SQL
    ---------------------------------------------------------------------
    There are more things in heaven and earth, Horatio,
    than are dreamt of in your philosophy
    ---------------------------------------------------------------------
     
    Scott Holmes, Aug 1, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Howard Lightstone

    Background image in toplevel

    Howard Lightstone, Sep 10, 2003, in forum: Python
    Replies:
    2
    Views:
    378
    Mark Hahn
    Sep 12, 2003
  2. Pete Moscatt

    Makeing TopLevel Modal ?

    Pete Moscatt, Apr 4, 2005, in forum: Python
    Replies:
    1
    Views:
    299
  3. =?Utf-8?B?Vk1J?=

    Closing popup window when closing parent window?

    =?Utf-8?B?Vk1J?=, Feb 14, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    654
    Thomas Hansen
    Feb 15, 2007
  4. thomas
    Replies:
    0
    Views:
    228
    thomas
    Oct 23, 2003
  5. Mel
    Replies:
    2
    Views:
    93
    Thomas 'PointedEars' Lahn
    Feb 4, 2004
Loading...

Share This Page