I'm trying to create a list control that combines both the TextEditMixin and CheckListCtrlMixin where the first column of the list would contain just a checkbox and the subsequent columns contain editable text.
It mostly works but I'm running into two problems.
1) I can only toggle the checkbox on non-selected rows. If a row is selected, I cannot toggle the checkbox.
2) Clicking on column 0 brings up a text editor for that column. I'd like to prevent his from happening.
Has anyone implemented something like this before? Hopefully this makes sense. My __init__ code is below.
class PunchList(wx.ListCtrl, listmix.CheckListCtrlMixin, listmix.ListCtrlAutoWidthMixin, listmix.TextEditMixin):
def __init__(self, parent, question):
wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT | wx.LC_VRULES | wx.LC_HRULES)
listmix.CheckListCtrlMixin.__init__(self)
listmix.ListCtrlAutoWidthMixin.__init__(self)
self.question = question
self.InsertColumn(0, "")
self.SetColumnWidth(0, 30)
self.InsertColumn(1, "#")
self.SetColumnWidth(1, 30)
self.InsertColumn(2, "Punch Text")
self.SetColumnWidth(2, wx.LIST_AUTOSIZE)
listmix.TextEditMixin.__init__(self)