// constructors and destructors
// ----------------------------------------------------------------------------
-wxBookCtrl::wxBookCtrl()
-{
- Init();
-}
-
-wxBookCtrl::wxBookCtrl(wxWindow *parent,
- wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxString& name)
-{
- Init();
-
- (void)Create(parent, id, pos, size, style, name);
-}
-
void wxBookCtrl::Init()
{
m_imageList = NULL;
// convert display area to window area, adding the size neccessary for the
// tabs
- return CalcSizeFromPage(bestSize);
+ wxSize best = CalcSizeFromPage(bestSize);
+ CacheBestSize(best);
+ return best;
}
// ----------------------------------------------------------------------------
_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;
}