Can dynamically set show/hide checkboxes in GitStatusListCtrl
authorSup Yut Sum <ch3cooli@gmail.com>
Tue, 22 Jan 2013 14:37:36 +0000 (22 22:37 +0800)
committerSven Strickroth <email@cs-ware.de>
Thu, 7 Feb 2013 23:33:12 +0000 (8 00:33 +0100)
Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
src/Git/GitStatusListCtrl.h

index 79d6d6c..f4634e8 100644 (file)
@@ -946,6 +946,16 @@ public:
 \r
 public:\r
        void SetBusy(bool b) {m_bBusy = b; Invalidate();}\r
+       void SetHasCheckboxes(bool bHasCheckboxes)\r
+       {\r
+               m_bHasCheckboxes = bHasCheckboxes;\r
+               DWORD exStyle = GetExtendedStyle();\r
+               if (bHasCheckboxes)\r
+                       exStyle |= LVS_EX_CHECKBOXES;\r
+               else\r
+                       exStyle &= ~LVS_EX_CHECKBOXES;\r
+               SetExtendedStyle(exStyle);\r
+       }\r
 \r
 private:\r
        void SaveColumnWidths(bool bSaveToRegistry = false);\r