]> git.saurik.com Git - wxWidgets.git/commitdiff
Put a cap on the number of lines used in DoGetBestSize
authorRobin Dunn <robin@alldunn.com>
Wed, 18 May 2005 02:26:37 +0000 (02:26 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 18 May 2005 02:26:37 +0000 (02:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/textctrl.cpp

index 7151acb27dec4dc928ba40675328e169c6a17e63..bcabaabb7d0cb12d81419a78967082e49a36fd9e 100644 (file)
@@ -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