From bb8967b96ef618819c30dc72db77f6f23188215c Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 18 May 2005 02:26:37 +0000 Subject: [PATCH] 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 --- src/msw/textctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.45.2