From 758a81148625d41e055ecde4faab6ad600439769 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 24 Jan 2009 14:12:59 +0000 Subject: [PATCH] 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 --- src/generic/choicbkg.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/generic/choicbkg.cpp b/src/generic/choicbkg.cpp index 9ba0e545e4..4b3194bcc0 100644 --- a/src/generic/choicbkg.cpp +++ b/src/generic/choicbkg.cpp @@ -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; -- 2.45.2