X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/628c219e64d0de476678437cbe8735373487b972..498a1eeb8d044ef64815352ecabe4c223adf8c6a:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 3172c51558..7151acb27d 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 ) { @@ -1875,12 +1886,12 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) return true; } -WXHBRUSH wxTextCtrl::MSWControlColor(WXHDC hDC) +WXHBRUSH wxTextCtrl::MSWControlColor(WXHDC hDC, WXHWND hWnd) { if ( !IsEnabled() && !HasFlag(wxTE_MULTILINE) ) return MSWControlColorDisabled(hDC); - return wxTextCtrlBase::MSWControlColorSolid(hDC); + return wxTextCtrlBase::MSWControlColor(hDC, hWnd); } bool wxTextCtrl::AdjustSpaceLimit()