]> git.saurik.com Git - wxWidgets.git/commitdiff
documented that wxHSCROLL disables wrapping; added comment to the source
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 10 Sep 2003 13:06:48 +0000 (13:06 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 10 Sep 2003 13:06:48 +0000 (13:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/text.tex
src/msw/textctrl.cpp

index f5fe95c452bf799fe08202cebf896a8f72eb3a61..7e2751726ac73e334fdc759516e51729d5180cc7 100644 (file)
@@ -241,7 +241,8 @@ under Win32 only and requires wxTE\_RICH.}
 \twocolitem{\windowstyle{wxTE\_NOHIDESEL}}{By default, the Windows text control
 doesn't show the selection when it doesn't have focus - use this style to force
 it to always show it. It doesn't do anything under other platforms.}
-\twocolitem{\windowstyle{wxHSCROLL}}{A horizontal scrollbar will be created. No effect under GTK+.}
+\twocolitem{\windowstyle{wxHSCROLL}}{A horizontal scrollbar will be created and
+used, so that text won't be wrapped. No effect under GTK+.}
 \twocolitem{\windowstyle{wxTE\_LEFT}}{The text in the control will be left-justified (default).}
 \twocolitem{\windowstyle{wxTE\_CENTRE}}{The text in the control will be centered.}
 \twocolitem{\windowstyle{wxTE\_RIGHT}}{The text in the control will be right-justified.}
index 48067eca29445aa23359105c1033cc3c052c4a2b..f70aa21b7cc4fe296a4af1c64489e5ad8a68cf6f 100644 (file)
@@ -464,11 +464,12 @@ WXDWORD wxTextCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
         msStyle |= ES_AUTOHSCROLL;
     }
 
-    // styles which we add depending on the specified wxWindows styles
-    if ( style & wxHSCROLL )
+    // note that wxTE_DONTWRAP is the same as wxHSCROLL so if we have a horz
+    // scrollbar, there is no wrapping -- which makes sense
+    if ( style & wxTE_DONTWRAP )
     {
         // automatically scroll the control horizontally as necessary
-        msStyle |= WS_HSCROLL;// | ES_AUTOHSCROLL;
+        msStyle |= WS_HSCROLL;
     }
 
     if ( style & wxTE_READONLY )
@@ -486,7 +487,7 @@ WXDWORD wxTextCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
     else if ( style & wxTE_RIGHT )
         msStyle |= ES_RIGHT;
     else
-        msStyle |= ES_LEFT; // ES_LEFT if 0 as well but for consistency...
+        msStyle |= ES_LEFT; // ES_LEFT is 0 as well but for consistency...
 
     return msStyle;
 }