Home > Software engineering >  Questions about listview index beyond the border
Questions about listview index beyond the border

Time:10-10

Listview1 are three records, including 2 rows 8 column has a value of 0, execute the following statements, prompt index beyond the border times when I=3

Cout=ListView1. ListItems. Count
For I=1 To cout
If listview1. Listitems (I). Listsubitems (8). The text=0 Then
ListView1. ListItems. Remove the I
End the If
Cout=ListView1. ListItems. Count
Next

CodePudding user response:

Look at the following line not line

Cout=ListView1. ListItems. Count
For I=0 To cout - 1
If listview1. Listitems (I). Listsubitems (8). The text=0 Then
ListView1. ListItems. Remove the I
End the If
Cout=ListView1. ListItems. Count
Next

  • Related