]> git.saurik.com Git - wxWidgets.git/commitdiff
added Set/ClearColumnImage() helpers to wxListView
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 3 Sep 2001 16:57:16 +0000 (16:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 3 Sep 2001 16:57:16 +0000 (16:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/listctrl.h

index 5de7d0c77cab9e39420feefe7098b517e17c16e8..f0630f8a8fedd83f1c7b2185f742e4c74115e52d 100644 (file)
@@ -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)
 };