]> git.saurik.com Git - wxWidgets.git/commitdiff
set or unset column image on column click
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 28 Aug 2005 13:27:08 +0000 (13:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 28 Aug 2005 13:27:08 +0000 (13:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/listctrl/listtest.cpp

index adf5a082ec79291e1d54a99fb8417ff7c7364d9d..dd01efe4f8e2e373e5ad5061a4fb71c9a3e0f029 100644 (file)
@@ -722,7 +722,11 @@ void MyListCtrl::SetColumnImage(int col, int image)
 void MyListCtrl::OnColClick(wxListEvent& event)
 {
     int col = event.GetColumn();
-    SetColumnImage(col, 0);
+
+    // set or unset image
+    static x = false;
+    x = !x;
+    SetColumnImage(col, x ? 0 : -1);
 
     wxLogMessage( wxT("OnColumnClick at %d."), col );
 }