...

View Full Version : Overriding Destroy in Python



needhelpnow
06-18-2009, 11:19 PM
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.

needhelpnow
06-19-2009, 04:29 PM
Nevermind. I got it working.

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

barabass
03-19-2010, 02:39 AM
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:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum