X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e58dab20ce995856303154a367bcca904066525c..bc797f4cc8ffe36277ba8b7dd4b57e63a96bfcb5:/src/os2/textctrl.cpp diff --git a/src/os2/textctrl.cpp b/src/os2/textctrl.cpp index 66b4819ebb..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) { @@ -208,7 +200,12 @@ bool wxTextCtrl::Create( // // Set font, position, size and initial value // - SetFont(*wxSMALL_FONT); + wxFont* pTextFont = new wxFont( 10 + ,wxMODERN + ,wxNORMAL + ,wxNORMAL + ); + SetFont(*pTextFont); if (!rsValue.IsEmpty()) { SetValue(rsValue); @@ -226,6 +223,7 @@ bool wxTextCtrl::Create( ,rSize.x ,rSize.y ); + delete pTextFont; return TRUE; } // end of wxTextCtrl::Create @@ -315,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 @@ -1126,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);