How to detect closing of wx.Panel?

J

Jacol

Hi everybody,

I have poblem with detecting closing of wx.Panel by user. How to detect that
event?

The wx.EVT_CLOSE event concerns wx.Frame class only. Neither Close() nor
Destroy() aren't executed if the event occurs (if user close a panel). Thus
extanding these both methods doesn't make sens (I've tested that).

With many thanks &
Best wishes,
Jacek
 
M

Morpheus

Hi everybody,

I have poblem with detecting closing of wx.Panel by user. How to detect that
event?

Don't know why you want to do that, but you could register with the
enclosing (hosting) widget.
The wx.EVT_CLOSE event concerns wx.Frame class only. Neither Close() nor
Destroy() aren't executed if the event occurs (if user close a panel). Thus
extanding these both methods doesn't make sens (I've tested that).

With many thanks &
Best wishes,
Jacek

Cheers
Morpheus
 
J

Jacol

Morpheus said:
Don't know why you want to do that, but you could register with the
enclosing (hosting) widget.

In my program a panel is related to a plugin's object. I mean if a panel is
closed the object have to be deleted also. Currently it doesn't work & i
have e memory leak. But i think i'll fixed a panel with its object
directly.

Currently i did it like that:


mainframe(wx.Frame)
subobject---> pluginsmanager -->object (a hash session=>object )
subobject---> panel

The panel send to pluginsmanager its own session no and received from that
XRC. But it is too complicated. I have to do it more simpler.

More @ pentrezy.cvs.sf.net//

Best wishes,
Jacek
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top