Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Overriding Destroy in Python

    Hi,

    I am trying to override the Destroy method in Python, but wanted to know how I can destroy the current panel after my custom code...

    def Destroy(self):
    # My Custom Code #
    # How to Destroy this Panel? #

    You cannot do self.Destroy() again because it get in to infinite loop.

    Any help appreciated.
    Thanks.

  • #2
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nevermind. I got it working.

    I just had to do the following in the override method:
    wx.Panel.Destroy(self)

  • #3
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up thanx

    Thanx man, you have no idea the time i spent looking for a solution to your problem, thanx a lot!
    I'll put this to let others find this: close panel, close frame, destroy frame, destroy panel, clear frame, clear panel


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •