diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 7a51c47577..2b633a5a0e 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -146,6 +146,13 @@ public: // returns true if it is a virtual list control bool IsVirtual() const { return (GetWindowStyle() & wxLC_VIRTUAL) != 0; } + // refresh items selectively (only useful for virtual list controls) + void RefreshItem(long item); + void RefreshItems(long itemFrom, long itemTo); + + // implementation only from now on + // ------------------------------- + void OnIdle( wxIdleEvent &event ); void OnSize( wxSizeEvent &event ); diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 4386a99a92..d2f3b99675 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -4920,4 +4920,14 @@ void wxListCtrl::SetItemCount(long count) m_mainWin->SetItemCount(count); } +void wxListCtrl::RefreshItem(long item) +{ + m_mainWin->RefreshLine(item); +} + +void wxListCtrl::RefreshItems(long itemFrom, long itemTo) +{ + m_mainWin->RefreshLines(itemFrom, itemTo); +} + #endif // wxUSE_LISTCTRL