From: Vadim Zeitlin Date: Tue, 5 Apr 2005 22:14:58 +0000 (+0000) Subject: fix for richedit version 1 control bug with bad refresh after resize under Windows XP X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9cf4b4398d733123709f8319c13e52afd0f67ef7 fix for richedit version 1 control bug with bad refresh after resize under Windows XP git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 3172c51558..7604356776 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -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 ) {