Applied [ 745533 ] implemented wxNotebook::DoGetBestSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -311,6 +311,33 @@ void wxNotebook::SetTabSize(const wxSize& sz)
|
||||
::SendMessage(GetHwnd(), TCM_SETITEMSIZE, 0, MAKELPARAM(sz.x, sz.y));
|
||||
}
|
||||
|
||||
wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
|
||||
{
|
||||
wxSize sizeTotal = sizePage;
|
||||
|
||||
// We need to make getting tab size part of the wxWindows API.
|
||||
wxSize tabSize(0, 0);
|
||||
if (GetPageCount() > 0)
|
||||
{
|
||||
RECT rect;
|
||||
TabCtrl_GetItemRect((HWND) GetHWND(), 0, & rect);
|
||||
tabSize.x = rect.right - rect.left;
|
||||
tabSize.y = rect.bottom - rect.top;
|
||||
}
|
||||
if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
|
||||
{
|
||||
sizeTotal.x += tabSize.x + 7;
|
||||
sizeTotal.y += 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
sizeTotal.x += 7;
|
||||
sizeTotal.y += tabSize.y + 7;
|
||||
}
|
||||
|
||||
return sizeTotal;
|
||||
}
|
||||
|
||||
void wxNotebook::AdjustPageSize(wxNotebookPage *page)
|
||||
{
|
||||
wxCHECK_RET( page, _T("NULL page in wxNotebook::AdjustPageSize") );
|
||||
|
Reference in New Issue
Block a user