ListView1 SelectedItems Clear

TexG

Regular
Joined
Apr 2, 2003
Messages
88
Location
San Antonio Texas
Hello All,

Got a problem i need help on.

Its with Listview and the SelectedItems Clear.

when i tab into a listview and get the ListView1.SelectedItems(0).Text and then click on lets say a delete button to remove the
ListView1.SelectedItems(0).Text and then tab back to the listview window everthing is fine.

But when i click on a item in listview and get the ListView1.SelectedItems(0).Text then click on the delete button to remove the item and then tab back into the listview window i get the first item selected and what ever the old count was is still
hilighted but its hilighted color is normal so it give the impression that two items are selected one is the first item hilighted and the second looks like its pressed in.

i have tryed to clear the selexted items but it only works when i tab around the form. its when i click the listview item that it wierds out on me

any ideals on how to fix this thanks
 
RE:

If Listbox.SelectedIndex > -1 Then Listbox.SelectedIndex = -1
will remove the selection from the listbox

Is that what you want?
 
Back
Top