From 0188c7023303963bac25241ebc26575b49fd7156 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 3 Sep 2001 16:57:16 +0000 Subject: [PATCH] added Set/ClearColumnImage() helpers to wxListView git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/listctrl.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/wx/listctrl.h b/include/wx/listctrl.h index 5de7d0c77c..f0630f8a8f 100644 --- a/include/wx/listctrl.h +++ b/include/wx/listctrl.h @@ -303,6 +303,9 @@ public: Create(parent, id, pos, size, style, wxDefaultValidator, name); } + // focus/selection stuff + // --------------------- + // [de]select an item void Select(long n, bool on = TRUE) { @@ -331,6 +334,20 @@ public: // return TRUE if the item is selected bool IsSelected(long index) { return GetItemState(index, wxLIST_STATE_SELECTED) != 0; } + + // columns + // ------- + + void SetColumnImage(int col, int image) + { + wxListItem item; + item.SetMask(wxLIST_MASK_IMAGE); + item.SetImage(image); + SetColumn(col, item); + } + + void ClearColumnImage(int col) { SetColumnImage(col, -1); } + private: DECLARE_DYNAMIC_CLASS(wxListView) }; -- 2.45.2