Kirix Support Forums

Detect which pane closed, when it closes

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

Detect which pane closed, when it closes

Postby damateem on Tue May 03, 2011 12:13 pm

Here is what I am trying to do...

* List all the available panes on the main menu.
* When the pane is visible, put a check next to its name in the menu.
* When the pane is closed by the user, remove the check.

I found the wxEVT_AUI_PANE_CLOSE event and it is being called when the pane closes, but I can't figure out how to detect which pane closed. When in the event handler, how do I know which pane caused the event to fire?

This feature is very common for applications with docking panes. I must be missing something obvious.

Thanks,
David
damateem
Registered User
 
Posts: 1
Joined: Tue May 03, 2011 11:57 am

Re: Detect which pane closed, when it closes

Postby R.U.10 on Wed May 11, 2011 8:42 am

Hello,

The wxAuiManagerEvent (which is sent by wxEVT_AUI_PANE_CLOSE) give you the wxAuiPaneInfo related to the pane responsible of the event. With the wxAuiPaneInfo object, you can retrieve most of the elements you need about the pane, for example the caption (`event.GetPane()->caption`) which can be used to retrieve a menu item which bear the same name.

Regards,
Kinaou
R.U.10
Registered User
 
Posts: 30
Joined: Mon May 21, 2007 9:26 am

Return to wxAUI Questions, Thoughts & Feedback