]> git.saurik.com Git - wxWidgets.git/commitdiff
Allow multiple lines for a static text
authorStefan Neis <Stefan.Neis@t-online.de>
Fri, 6 Jan 2006 16:01:33 +0000 (16:01 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Fri, 6 Jan 2006 16:01:33 +0000 (16:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/os2/stattext.cpp

index 66e40729973eefba7733aae2c68b6f0fde8a88b4..a344877e2bde55a4b73ea80c68c36f6dcbdde21a 100644 (file)
@@ -56,7 +56,10 @@ bool wxStaticText::Create(
 
     long                            lSstyle = 0L;
 
-    lSstyle = WS_VISIBLE | SS_TEXT | DT_VCENTER | DT_MNEMONIC;
+    // Used to have DT_VCENTER but that doesn't work correctly with
+    // multiline strings and DT_WORDBREAK. Accept a reasonable
+    // compromise for now
+    lSstyle = WS_VISIBLE | SS_TEXT | DT_WORDBREAK | DT_MNEMONIC;
     if (m_windowStyle & wxALIGN_CENTRE)
         lSstyle |= DT_CENTER;
     else if (m_windowStyle & wxALIGN_RIGHT)