From 1a6cb56fb5d06e98fd3fae24cefbe7b244a20820 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 13 Jul 2001 20:09:44 +0000 Subject: [PATCH] added RefreshItem(s) methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/listctrl.h | 7 +++++++ src/generic/listctrl.cpp | 10 ++++++++++ 2 files changed, 17 insertions(+) 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