X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/39c26ef2d77a7a67a717e51f2cd370759ea9243c..2c18f21dc7d5aedd7100b02f7a721551b73c537b:/src/os2/textctrl.cpp diff --git a/src/os2/textctrl.cpp b/src/os2/textctrl.cpp index 2849aec84f..0e4b7a4461 100644 --- a/src/os2/textctrl.cpp +++ b/src/os2/textctrl.cpp @@ -18,6 +18,7 @@ #ifndef WX_PRECOMP #include "wx/textctrl.h" + #include "wx/scrolwin.h" #include "wx/settings.h" #include "wx/brush.h" #include "wx/utils.h" @@ -43,7 +44,7 @@ # include #endif -#if defined(__EMX__) && !defined(MLE_INDEX) +#if !defined(MLE_INDEX) #define MLE_INDEX 0 #define MLE_RGB 1 #endif @@ -158,8 +159,8 @@ bool wxTextCtrl::Create( // if ( m_windowStyle & wxTE_MULTILINE ) { + lSstyle |= MLS_BORDER | MLS_WORDWRAP; m_bIsMLE = TRUE; - m_windowStyle |= wxTE_PROCESS_ENTER; if ((m_windowStyle & wxTE_NO_VSCROLL) == 0) lSstyle |= MLS_VSCROLL; @@ -170,7 +171,7 @@ bool wxTextCtrl::Create( } else { - lSstyle |= ES_LEFT; + lSstyle |= ES_LEFT | ES_AUTOSCROLL | ES_MARGIN; if (m_windowStyle & wxHSCROLL) lSstyle |= ES_AUTOSCROLL; @@ -283,6 +284,14 @@ void wxTextCtrl::SetupColours() vBkgndColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW); SetBackgroundColour(vBkgndColour); SetForegroundColour(GetParent()->GetForegroundColour()); + if (m_bIsMLE) + { + ::WinSendMsg( GetHwnd() + ,MLM_SETTEXTCOLOR + ,(MPARAM)GetParent()->GetForegroundColour().GetPixel() + ,(MPARAM)MLE_RGB + ); + } } // end of wxTextCtrl::SetupColours // ---------------------------------------------------------------------------- @@ -1129,7 +1138,7 @@ wxSize wxTextCtrl::DoGetBestSize() const wxGetCharSize(GetHWND(), &nCx, &nCy, (wxFont*)&GetFont()); int wText = DEFAULT_ITEM_WIDTH; - int hText = EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy); + int hText = (EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy) * .8); if (m_windowStyle & wxTE_MULTILINE) {