PDA

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)