Improve sizer support in generic wxNotebook. Fix the widgets sample

to take advantage of it.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2005-08-28 08:00:25 +00:00
parent d30814cdf2
commit 6bae67261c
3 changed files with 19 additions and 1 deletions

View File

@@ -622,6 +622,17 @@ void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event) )
m_tabView->Draw(dc);
}
wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
{
// MBN: since the total tab height is really a function of the
// width, this should really call
// GetTotalTabHeightPretendingWidthIs(), but the current
// implementation will suffice, provided the wxNotebook has been
// created with a sensible initial width.
return wxSize( sizePage.x + 12,
sizePage.y + m_tabView->GetTotalTabHeight() + 6 + 4 );
}
wxRect wxNotebook::GetAvailableClientSize()
{
int cw, ch;