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:
@@ -122,10 +122,19 @@ public:
|
||||
virtual bool DeletePage(size_t n);
|
||||
|
||||
// remove one page from the notebook, without deleting it
|
||||
virtual bool RemovePage(size_t n) { return DoRemovePage(n) != NULL; }
|
||||
virtual bool RemovePage(size_t n)
|
||||
{
|
||||
InvalidateBestSize();
|
||||
return DoRemovePage(n) != NULL;
|
||||
}
|
||||
|
||||
// remove all pages and delete them
|
||||
virtual bool DeleteAllPages() { WX_CLEAR_ARRAY(m_pages); return true; }
|
||||
virtual bool DeleteAllPages()
|
||||
{
|
||||
InvalidateBestSize();
|
||||
WX_CLEAR_ARRAY(m_pages);
|
||||
return true;
|
||||
}
|
||||
|
||||
// adds a new page to the control
|
||||
virtual bool AddPage(wxWindow *page,
|
||||
@@ -133,6 +142,7 @@ public:
|
||||
bool bSelect = false,
|
||||
int imageId = -1)
|
||||
{
|
||||
InvalidateBestSize();
|
||||
return InsertPage(GetPageCount(), page, text, bSelect, imageId);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user