Retrieving the pane associated to a paneinfo

Hello everybody,

I have an application that basically contains a top level auimanager where we can drag and drop some panels.
When the panel is dropped it is inserted in the auimanager as a new pane. The dropped panel can receive in turn other
panels by drag and drop process and so on …

Those panes should trigger special actions when closed. To track this, I bound to my top level manager an
EVT_AUI_PANE_CLOSE event. The event handler is actually called when the panels is closed BUT the event gives
me an paneinfo object from which I do not manage to retrieve the actual pane that was closed. I could use caption or name
attributes of the paneinfo object but several panes can have the captions/names making hard to track which one was closed.

Is there a way to get directly the window
that was closed from the AUIPaneInfo returned by the EVT_AUI_PANE_CLOSE event ?

thanks a lot

Eric

Hi,

···

On 27 June 2013 09:54, Pellegrini Eric wrote:

Hello everybody,

I have an application that basically contains a top level auimanager where we can drag and drop some panels.
When the panel is dropped it is inserted in the auimanager as a new pane. The dropped panel can receive in turn other

panels by drag and drop process and so on …

Those panes should trigger special actions when closed. To track this, I bound to my top level manager an
EVT_AUI_PANE_CLOSE event. The event handler is actually called when the panels is closed BUT the event gives

me an paneinfo object from which I do not manage to retrieve the actual pane that was closed. I could use caption or name
attributes of the paneinfo object but several panes can have the captions/names making hard to track which one was closed.

Is there a way to get directly the window
that was closed from the AUIPaneInfo returned by the EVT_AUI_PANE_CLOSE event ?

The AuiPaneInfo class has a “window” attribute which will return the wxPython control associated with that pane. Is this what you are looking for?

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”
http://www.infinity77.net

-------------------------------------------------------------

def ask_mailing_list_support(email):

if mention_platform_and_version() and include_sample_app():
    send_message(email)
else:
    install_malware()
    erase_hard_drives()

-------------------------------------------------------------

Hi Andrea,

oups, I missed that one. That’s exactly what I was looking for. Thanks a lot.

Eric

···

De : Andrea Gavana andrea.gavana@gmail.com
À : wxPython-users wxpython-users@googlegroups.com
Envoyé le : Jeudi 27 juin 2013 10h15
Objet : Re: [wxPython-users] Retrieving the pane associated to a paneinfo

Hi,

On 27 June 2013 09:54, Pellegrini Eric wrote:

Hello everybody,

I have an application that basically contains a top level auimanager where we can drag and drop some panels.
When the panel is dropped it is inserted in the auimanager as a new pane. The dropped panel can receive in turn other

panels by drag and drop process and so on …

Those panes should trigger special actions when closed. To track this, I bound to my top level manager an
EVT_AUI_PANE_CLOSE event. The event handler is actually called when the panels is closed BUT the event gives

me an paneinfo object from which I do not manage to retrieve the actual pane that was closed. I could use caption or name
attributes of the paneinfo object but several panes can have the captions/names making hard to track which one was closed.

Is there a way to get directly the window
that was closed from the AUIPaneInfo returned by the EVT_AUI_PANE_CLOSE event ?

The AuiPaneInfo class has a “window” attribute which will return the wxPython control associated with that pane. Is this what you are looking for?

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”
http://www.infinity77.net

-------------------------------------------------------------

def ask_mailing_list_support(email):

if mention_platform_and_version() and include_sample_app():
    send_message(email)
else:
    install_malware()
    erase_hard_drives()

-------------------------------------------------------------

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.