Listview Problem
-
I am using a Listview control in VB 6 SP5. I highlight the last entry accessed by the user by setting listview.selecteditem = listview.listitems(5), for example. If I shift-click on an item in the list, say item 6 when item 5 is lit, everything from item 6 to item 1 is highlighted instead of just items 5 and 6. The following code reproduces the problem. It is the form load for a new form with a listview control added to the form. Private Sub Form_Load() Dim i As Integer Dim lv As ListItem ListView1.MultiSelect = True For i = 1 To 10 Set lv = ListView1.ListItems.Add(, , "Item " & i) lv.Selected = False Next i Set lv = ListView1.ListItems(5) Set ListView1.SelectedItem = lv End Sub If I now shift-click item 6, 1 through 6 are lit. Any ideas? Maybe a listview bug? Thanks for your help. Dave