From: Robin Dunn Date: Wed, 18 May 2005 02:26:37 +0000 (+0000) Subject: Put a cap on the number of lines used in DoGetBestSize X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bb8967b96ef618819c30dc72db77f6f23188215c Put a cap on the number of lines used in DoGetBestSize git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 7151acb27d..bcabaabb7d 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1960,7 +1960,7 @@ wxSize wxTextCtrl::DoGetBestSize() const int hText = cy; if ( m_windowStyle & wxTE_MULTILINE ) { - hText *= wxMax(GetNumberOfLines(), 5); + hText *= wxMax(wxMin(GetNumberOfLines(), 10), 2); } //else: for single line control everything is ok