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
This commit is contained in:
Julian Smart
2002-12-10 21:50:11 +00:00
parent f0e1c34310
commit 03d1ae1799

View File

@@ -353,9 +353,15 @@ void wxScrollHelper::SetScrollbars(int pixelsPerUnitX,
if (do_refresh && !noRefresh) if (do_refresh && !noRefresh)
m_targetWindow->Refresh(TRUE, GetRect()); 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__ #ifdef __WXMAC__
m_targetWindow->MacUpdateImmediately() ; m_targetWindow->MacUpdateImmediately() ;
#endif #endif
#endif
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------