I'm relatively new to wxAui and have a problem while detaching a pane.
Following situation: A add a pane to the wxAuiManager. The close event is sent to that window, I set with SetManagedWindow. In the method that is called with the close event, I want to detach this pane from the wxAuiManager.
But that causes a runtime error in wxFrameManager::ClosePane at line 1093 in
- Code: Select all
if (pane_info.window && pane_info.window->IsShown())
{
pane_info.window->Show(false);
}
I used that source code to detach the pane:
- Code: Select all
if (evt.pane->name == wxT("Suche"))
{
if (m_pWScroll)
{
m_mgr->DetachPane(m_pWScroll);
m_pWScroll->Destroy();
m_pWScroll = NULL;
m_mgr->Update();
}
}
where m_mgr is wxAuiManager and m_pWScroll is the frame, that I closed. What have I done wrong?
Best regards, BigFreeze