Prevent OnClose event and instead just minimize the window

hello,

I am trying to learn wxpython. Is it possible to just minimize the child frame,
if a user clicked the child frame close window? Then if the user wants to close
the main app put the childframe.destroy() in the parent/main frame on close event?

···

--
-dax

sure you can, just add custom handlers for the EVT_CLOSE event for the both windows. In the child handler call self.Iconize() instead of self.Destroy().
I'm new to wxPython too so don't take my word for granted :wink:

···

On Thu, 22 Jan 2004 09:00:56 +0800, Dakila Reyes II <dareyes@up.edu.ph> wrote:

I am trying to learn wxpython. Is it possible to just minimize the child frame,
if a user clicked the child frame close window? Then if the user wants to close
the main app put the childframe.destroy() in the parent/main frame on close event?

--
Peter Damoc
Hacker Wannabe