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
This commit is contained in:
@@ -1960,7 +1960,7 @@ wxSize wxTextCtrl::DoGetBestSize() const
|
|||||||
int hText = cy;
|
int hText = cy;
|
||||||
if ( m_windowStyle & wxTE_MULTILINE )
|
if ( m_windowStyle & wxTE_MULTILINE )
|
||||||
{
|
{
|
||||||
hText *= wxMax(GetNumberOfLines(), 5);
|
hText *= wxMax(wxMin(GetNumberOfLines(), 10), 2);
|
||||||
}
|
}
|
||||||
//else: for single line control everything is ok
|
//else: for single line control everything is ok
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user