// convert display area to window area, adding the size neccessary for the
// tabs
- return CalcSizeFromPage(bestSize);
+ wxSize best = CalcSizeFromPage(bestSize);
+ CacheBestSize(best);
+ return best;
}
// ----------------------------------------------------------------------------
bool
wxBookCtrl::InsertPage(size_t nPage,
wxWindow *page,
- const wxString& text,
- bool bSelect,
- int imageId)
+ const wxString& WXUNUSED(text),
+ bool WXUNUSED(bSelect),
+ int WXUNUSED(imageId))
{
wxCHECK_MSG( page, false, _T("NULL page in wxBookCtrl::InsertPage()") );
wxCHECK_MSG( nPage <= m_pages.size(), false,
_T("invalid page index in wxBookCtrl::InsertPage()") );
m_pages.Insert(page, nPage);
+ InvalidateBestSize();
return true;
}
wxWindow *pageRemoved = m_pages[nPage];
m_pages.RemoveAt(nPage);
+ InvalidateBestSize();
return pageRemoved;
}