]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
set size hints so that the window won't shrink too much
[wxWidgets.git] / src / msw / textctrl.cpp
index c4c015a3df0024bea86a8f923faf61cf37972178..25e2ec905550b32288ebcfd4fa70cfc1e1322165 100644 (file)
@@ -461,7 +461,12 @@ WXDWORD wxTextCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
     if ( style & wxTE_DONTWRAP )
     {
         // automatically scroll the control horizontally as necessary
-        msStyle |= WS_HSCROLL;
+        //
+        // NB: ES_AUTOHSCROLL is needed for richedit controls or they don't
+        //     show horz scrollbar at all, even in spite of WS_HSCROLL, and as
+        //     it doesn't seem to do any harm for plain edit controls, add it
+        //     always
+        msStyle |= WS_HSCROLL | ES_AUTOHSCROLL;
     }
 
     if ( style & wxTE_READONLY )