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

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2009-01-24 14:12:59 +00:00
parent 98359ac7b5
commit 758a811486

View File

@ -143,11 +143,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;