|
-
February 22nd, 2000, 10:42 AM
#1
ListView bug
Hello,
I have used the following code to remove item (file name) from listview control:
For i = 0 To List1.ListCount - 1
If List1.Selected(i) Then
List1.RemoveItem i
List1.Refresh
End If
Next i
And I have meet the following error:
1) if i select the first item in the list to delet it, I got this errow code: *381* Invalide property array index.
2) if i select the middle item in the list, Nothing happen
3)But if i *first* select the last item in the list then delet it, It works fine.. and then i can delete all items no matter the order i select.
I have a hard time to figure the cause. But want it work nomatter the order user selects. Please help! Thanks!
-
February 22nd, 2000, 10:57 AM
#2
Re: ListView bug
Nope not a bug...
I don't know though, but change your loop to walk back, for i = listcount - 1 to 0 step -1, that should help (I hope...)
Crazy D :-)
"One ring rules them all"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|