X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65fd5cb0124e62ab1fc41f93382a205d95b00e75..75d684d9f772126b02aaea7eedadc79cd24aaf32:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 6770cc598c..6965ccf42a 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -115,7 +115,8 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, if ( !CreateBase(parent, id, pos, size, style, validator, name) ) return FALSE; - SetValidator(validator); + // Validator was set in CreateBase + //SetValidator(validator); if ( parent ) parent->AddChild(this); @@ -131,12 +132,17 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, _T("wxTE_PROCESS_ENTER style is ignored for multiline " "text controls (they always process it)") ); - msStyle |= ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL; + msStyle |= ES_MULTILINE | ES_WANTRETURN; + if ((m_windowStyle & wxTE_NO_VSCROLL) == 0) + msStyle |= WS_VSCROLL; m_windowStyle |= wxTE_PROCESS_ENTER; } else msStyle |= ES_AUTOHSCROLL; + if (m_windowStyle & wxHSCROLL) + msStyle |= (WS_HSCROLL | ES_AUTOHSCROLL); + if (m_windowStyle & wxTE_READONLY) msStyle |= ES_READONLY;