]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for richedit version 1 control bug with bad refresh after resize under Windows XP
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 5 Apr 2005 22:14:58 +0000 (22:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 5 Apr 2005 22:14:58 +0000 (22:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/textctrl.cpp

index 3172c515583990f4c1afa406645ec444cf7505e7..7604356776750e5bd25ab29157392104b6a5d919 100644 (file)
@@ -394,6 +394,17 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
             // we also need EN_MSGFILTER for richedit 1.0 for the reasons
             // explained in its handler
            mask |= ENM_MOUSEEVENTS;
+
+           // we also need to force the appearance of the vertical scrollbar
+           // initially as otherwise the control doesn't refresh correctly
+           // after resize: but once the vertical scrollbar had been shown
+           // (even if it's subsequently hidden) it does
+           //
+           // this is clearly a bug and for now it has been only noticed under
+           // Windows XP, so if we're sure it works correctly under other
+           // systems we could do this only for XP
+           SetSize(-1, 1); // 1 is small enough to force vert scrollbar
+           SetSize(size);
         }
         else if ( m_windowStyle & wxTE_AUTO_URL )
         {