]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 651649 ] Scrollbar not updated without resizing
authorJulian Smart <julian@anthemion.co.uk>
Tue, 10 Dec 2002 21:50:11 +0000 (21:50 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 10 Dec 2002 21:50:11 +0000 (21:50 +0000)
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

src/generic/scrlwing.cpp

index f65fb4b487ee62480ec3820e0db12671ebecd31e..8c40ecb8534b809a13c995cbb50188f6f91a62a3 100644 (file)
@@ -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
 }
 
 // ----------------------------------------------------------------------------