From: Vadim Zeitlin Date: Sun, 28 Aug 2005 13:27:08 +0000 (+0000) Subject: set or unset column image on column click X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f0cf38b706429b69ae87b3d452665bac59356c93 set or unset column image on column click git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index adf5a082ec..dd01efe4f8 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -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 ); }