X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2c1e8f2ec2400f618468e72f2faf32373f53a4c9..59840ba3b16e4baf3228dd79c6b7ae40b55cf488:/src/os2/textctrl.cpp diff --git a/src/os2/textctrl.cpp b/src/os2/textctrl.cpp index 61e2be6e40..87c8150bac 100644 --- a/src/os2/textctrl.cpp +++ b/src/os2/textctrl.cpp @@ -154,14 +154,6 @@ bool wxTextCtrl::Create( if (m_windowStyle & wxTE_PASSWORD) // hidden input lSstyle |= ES_UNREADABLE; } - // - // If the parent is a scrolled window the controls must - // have this style or they will overlap the scrollbars - // - if (pParent) - if (pParent->IsKindOf(CLASSINFO(wxScrolledWindow)) || - pParent->IsKindOf(CLASSINFO(wxGenericScrolledWindow))) - lSstyle |= WS_CLIPSIBLINGS; if (m_bIsMLE) { @@ -231,6 +223,7 @@ bool wxTextCtrl::Create( ,rSize.x ,rSize.y ); + delete pTextFont; return TRUE; } // end of wxTextCtrl::Create @@ -320,7 +313,10 @@ void wxTextCtrl::WriteText( const wxString& rsValue ) { - ::WinSetWindowText(GetHwnd(), rsValue.c_str()); + if (m_bIsMLE) + ::WinSendMsg(GetHwnd(), MLM_INSERT, MPARAM((PCHAR)rsValue.c_str()), MPARAM(0)); + else + ::WinSetWindowText(GetHwnd(), rsValue.c_str()); AdjustSpaceLimit(); } // end of wxTextCtrl::WriteText @@ -1131,7 +1127,7 @@ wxSize wxTextCtrl::DoGetBestSize() const if (m_windowStyle & wxTE_MULTILINE) { - hText *= wxMin(GetNumberOfLines(), 5); + hText *= wxMax(GetNumberOfLines(), 5); } //else: for single line control everything is ok return wxSize(wText, hText);