Selected Property Does Not Work in Multi-Select ListViews


Id: 4089.6
Type: Bug Bug
Current Status: Resolved


4 Jun 2003 Open Vasanth Raj

The “.selected” property of the cListItem only appears to work if set programmatically. I was intending to use the “.selected” property to determine which of the items in the listView have been selected so the user can delete / copy / etc. them. The “lwvMain.SelectedItem” property correctly gives a cListItem reference to the selected cListItem but it doesn’t work when multiple items are selected. Is the selected property only meant to be used programmatically?

Using the TestListView6.exe sample shows exactly the same behaviour. If you select an item and click the “Info” button, the summary of the properties shows “Selected = False”. I’d appreciate any help or advice you can offer.

20 Jun 2003 Resolved Steve McMahon

The call to get the state of the item was not actually asking if the LVIS_SELECTED state was set. Fixed. Same problem occurred with the ItemCut method.