take into account the controlling wxChoice size in GetBestSize() (closes #10394)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@58355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-01-24 14:12:59 +00:00
parent 95a56e2aea
commit 9f403f22f8

View File

@@ -146,11 +146,15 @@ wxSize wxChoicebook::CalcSizeFromPage(const wxSize& sizePage) const
wxSize size = sizePage;
if ( IsVertical() )
{
if ( sizeChoice.x > sizePage.x )
size.x = sizeChoice.x;
size.y += sizeChoice.y + GetInternalBorder();
}
else // left/right aligned
{
size.x += sizeChoice.x + GetInternalBorder();
if ( sizeChoice.y > sizePage.y )
size.y = sizeChoice.y;
}
return size;