Kirix Support Forums

wxEVT_AUI_PANEBUTTON

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

wxEVT_AUI_PANEBUTTON

Postby Lord Darkblade on Wed Aug 30, 2006 8:17 am

I am currently attempting to create "reloadable" panels similar to visual studio whereby a closed pane can be reopened from the menu (it becomes hidden rather than destroyed).

In an attempt to perform this action I have overridden the event using:

this->Connect (ID_MyEvent, wxEVT_AUI_PANEBUTTON, (wxObjectEventFunction) myHandler);


The handler function then uses the following (m_mgr is declared private in this class).

wxPanelInfo temp = m_mgr.GetPane (SamplePane);
temp.Hide();
m_mgr.Update();


And the restore method (in a different pane, same class).

wxPaneInfo temp = m_mgr.GetPane (SamplePane);
temp.Show();
m_mgr.Update();


Adding debug information (a pile of log data, IsShown, hasCaption etc) shows that the SamplePane is still active and is correctly hidden and shown programatically, however the frame manager successfully hides the pane (removes from display) however the pane is never reshown.

Any thoughts?

Thanks
Lord Darkblade
Registered User
 
Posts: 4
Joined: Tue Aug 29, 2006 7:51 am

Postby Lord Darkblade on Wed Aug 30, 2006 9:08 am

It seems that the Frame in the manager doesn't get the event, nor does the pane I mounted. How do I specify an ID suitable for identifying this item / event?
Lord Darkblade
Registered User
 
Posts: 4
Joined: Tue Aug 29, 2006 7:51 am

Postby Lord Darkblade on Thu Aug 31, 2006 1:47 am

I have a solution, however its not terribly pretty.

Hide and Show do seem to do what they say, they hide or "show" the panel. which then does not update in the manager.

However I can intercept all events (wxID_ANY) and catch the paneClose events, instead of handling the hide / show I detach the pane and update the manager before hiding the pane. When I need to recall the pane I simply reattach it to the manager and update.

Is it possible to find out the ID of events that trigger the button close?
Lord Darkblade
Registered User
 
Posts: 4
Joined: Tue Aug 29, 2006 7:51 am

Return to wxAUI Questions, Thoughts & Feedback