will insert a checkbox everytime a call to Append is made.
However, I cannot figure out how to get a checkbox into the header
column. I want to introduce a checkbox, that when selected will
select all the items in the list control and vice versa.
will insert a checkbox everytime a call to Append is made.
However, I cannot figure out how to get a checkbox into the header
column. I want to introduce a checkbox, that when selected will
select all the items in the list control and vice versa.
In other words I want to do something akin to:
select_all_cb = wx.CheckBox(self, -1)
self.InsertColumn(0, select_all_cb)
Is this possible?
Thanks
I’m not sure. You might be able to draw it on there and handle it that way using a wx.DC. However, I am pretty sure you could do that with the UltimateListCtrl. Check the demo out and see if it can do what you want.
You can put icons on the headers so you can have a checkbox by swapping images similarly to how the CheckListCtrlMixin does it for the rows. There is an extra helper function added on to wx.ListCtrl by wxPython called SetColumnImage that does the work for you. There is also a ClearColumnImage if you want to get rid of it.
will insert a checkbox everytime a call to Append is made.
However, I cannot figure out how to get a checkbox into the header
column. I want to introduce a checkbox, that when selected will
select all the items in the list control and vice versa.