I’m using a ListView in report style with checkboxes. Multiselect is False. The idea is that there is always only one item selected, but Multiselect doesn’t stop multiple items being checked. So I added the following code to the ItemCheck event:
This worked fine with the standard ListView, but with the CCListView both checking and unchecking an item fires the ItemCheck event. (Which is logic I guess.)Code:Dim i As Integer 'Uncheck all items For i = 1 To lvPositionLabels.ListItems.Count lvPositionLabels.ListItems(i).Checked = False Next 'Check and select the clicked item Item.Checked = True Item.Selected = True
The question is though, how can I ensure only the last clicked item is checked. I’m probably missing something simple, but am stuck…




Reply With Quote