X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/decb3a6a16ea5acf1dfcdb1b70cb6edaa09840c0..2fe212b0336512aac9eace69fab09ce856b0bf4b:/src/msw/textctrl.cpp?ds=sidebyside diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 0de8b105d5..d3b91d242b 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -200,21 +200,27 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, msStyle |= WS_VSCROLL; m_windowStyle |= wxTE_PROCESS_ENTER; } - else + else // !multiline + { + // there is really no reason to not have this style for single line + // text controls msStyle |= ES_AUTOHSCROLL; + } - if (m_windowStyle & wxHSCROLL) - msStyle |= (WS_HSCROLL | ES_AUTOHSCROLL); + if ( m_windowStyle & wxHSCROLL ) + msStyle |= WS_HSCROLL | ES_AUTOHSCROLL; - if (m_windowStyle & wxTE_READONLY) + if ( m_windowStyle & wxTE_READONLY ) msStyle |= ES_READONLY; - if (m_windowStyle & wxTE_PASSWORD) // hidden input + if ( m_windowStyle & wxTE_PASSWORD ) msStyle |= ES_PASSWORD; - if (m_windowStyle & wxTE_AUTO_SCROLL) - msStyle |= ES_AUTOHSCROLL; + if ( m_windowStyle & wxTE_AUTO_SCROLL ) + msStyle |= ES_AUTOHSCROLL; + if ( m_windowStyle & wxTE_NOHIDESEL ) + msStyle |= ES_NOHIDESEL; // we always want the characters and the arrows m_lDlgCode = DLGC_WANTCHARS | DLGC_WANTARROWS;