From: Julian Smart Date: Tue, 10 Dec 2002 21:50:11 +0000 (+0000) Subject: Applied patch [ 651649 ] Scrollbar not updated without resizing X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/03d1ae179905c0bdc720cd1c444a557f1e7a044b?ds=inline Applied patch [ 651649 ] Scrollbar not updated without resizing I always wondered why the scrollbar of the listbox or the log window (textctrl) never showed a thumb in the control sample while the combobox does. The AdjustScrollbars gets called through a size event and this happens before the listbox (textctrl) can set the values for the scrollbar. So always an empty scrollbar is shown. This patch calls AdjustScrollbars at the end of SetScrollbars in scrlwing.cpp. I'm not sure if this is the best fix but it works nicely. I've only tested it with wxUniv but it should be okay in any generic case. (applied for __WXUNIVERSAL__ only for now -- JACS) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index f65fb4b487..8c40ecb853 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -353,9 +353,15 @@ void wxScrollHelper::SetScrollbars(int pixelsPerUnitX, if (do_refresh && !noRefresh) m_targetWindow->Refresh(TRUE, GetRect()); + // TODO: check if we can use AdjustScrollbars always. +#ifdef __WXUNIVERSAL__ + AdjustScrollbars(); +#else + // This is also done by AdjustScrollbars, above #ifdef __WXMAC__ m_targetWindow->MacUpdateImmediately() ; #endif +#endif } // ----------------------------------------------------------------------------