Invalidate notebook best size when pages are added or removed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-07-03 15:49:29 +00:00
parent 5d91a08807
commit 37144cf0f1
10 changed files with 31 additions and 13 deletions

View File

@@ -390,11 +390,8 @@ void MyFrame::ReInitNotebook()
m_notebook->AddPage(page, str, false, m_notebook->GetIconIndex() );
}
if (m_sizerNotebook)
{
m_sizerTop->Remove(m_sizerNotebook);
}
m_sizerTop->Remove(notebook);
delete notebook;
// restore selection
@@ -406,8 +403,7 @@ void MyFrame::ReInitNotebook()
}
m_sizerNotebook = new wxBookCtrlSizer(m_notebook);
m_sizerTop->Add(m_sizerNotebook, 1, wxEXPAND | wxALL, 4);
m_sizerTop->Add(m_notebook, 1, wxEXPAND | wxALL, 4);
m_sizerTop->Layout();
}