I am not sure my question is really related to wxAUI but I will try first here.
I have a two different content window declared like this whose one is derived from a XRC description:
- Code: Select all
//-----------------------------------------------------------------------------
// Event table: connect the events to the handler functions to process them
//-----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(ReaderPropPanel, wxPanel)
END_EVENT_TABLE()
ReaderPropPanel::ReaderPropPanel(wxWindow* parent):
wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize)
{
wxXmlResource::Get()->LoadPanel(parent, _T("MyPanel1"));
wxBitmap bmp;
}
// class destructor
ReaderPropPanel::~ReaderPropPanel()
{
// insert your code here
}
void MainFrame::CreateIDE()
{
CreateMenubar();
CreateToolbars();
m_pReaderPanel = new ReaderPropPanel(this);
m_pReaderPanel->Show(false);
m_FrmMgr.AddPane(m_pReaderPanel,wxPaneInfo().Name(wxT("reader_panel")).
CenterPane().Hide());
m_FrmMgr.Update();
pMsgDockBar = new MsgDockBar (this,wxT("Messages"), wxPoint(64,64 ), wxSize(120,120), &m_FrmMgr );
pProjDockBar = new ProjDockBar(this,wxT("Project"), wxPoint(64,64 ), wxSize(255,80), &m_FrmMgr );
// Add content window
wxTextCtrl *content = new wxTextCtrl(this, wxID_ANY, wxT("This is the content window"),
wxPoint(), wxSize(100,100), wxTE_MULTILINE | wxTE_WORDWRAP);
m_FrmMgr.AddPane(content, wxPaneInfo().Name(wxT("content")).CenterPane());
m_FrmMgr.Update();
//content->LoadFile(wxT("demo_text.txt"));
// make some default perspectives
wxString perspective_all = m_FrmMgr.SavePerspective();
// Show Content window
m_FrmMgr.GetPane(wxT("content")).Show();
// "commit" all changes made to wxFrameManager
m_FrmMgr.Update();
}
The problem is when I do :
m_pReaderPanel = new ReaderPropPanel(this);
m_pReaderPanel->Show(false);
m_FrmMgr.AddPane(m_pReaderPanel,wxPaneInfo().Name(wxT("reader_panel")).
CenterPane().Hide());
m_FrmMgr.Update();
My panel is shown while I don't want to. What's wrong with that ?