Fixed best size of wxUniv's wxNotebook.

Removed wxNotebook::DoGetBestClientSize to let wxBookCtrlBase::DoGetBestSize do its job and fix the best size of a wxNotebook (formerly when running the notebook sample the notebook was not wide enough).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth 2011-08-25 23:32:05 +00:00
parent b849473237
commit b15dfd0895
2 changed files with 0 additions and 29 deletions

View File

@ -130,7 +130,6 @@ protected:
void DoDrawTab(wxDC& dc, const wxRect& rect, size_t n);
// resizing
virtual wxSize DoGetBestClientSize() const;
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual void DoSetSize(int x, int y,
int width, int height,

View File

@ -1258,34 +1258,6 @@ void wxNotebook::ScrollLastTo(size_t page)
// wxNotebook sizing/moving
// ----------------------------------------------------------------------------
wxSize wxNotebook::DoGetBestClientSize() const
{
// calculate the max page size
wxSize size;
size_t count = GetPageCount();
if ( count )
{
for ( size_t n = 0; n < count; n++ )
{
wxSize sizePage = m_pages[n]->GetSize();
if ( size.x < sizePage.x )
size.x = sizePage.x;
if ( size.y < sizePage.y )
size.y = sizePage.y;
}
}
else // no pages
{
// use some arbitrary default size
size.x =
size.y = 100;
}
return GetSizeForPage(size);
}
void wxNotebook::DoMoveWindow(int x, int y, int width, int height)
{
wxControl::DoMoveWindow(x, y, width, height);