Hi Olby,
Removing item 0 only removes item 0. There is no invisible parent item.
There is a logical bug in your first piece of code, which is why it doesn't work. Every time you delete an item, all the indicies shift down one. So if there are 10 items in the list, and you delete one, there will only be 9 items in the list. So a For-Loop that tries to delete items with indicies from 0 to 10 would not work because by the time that it tries to delete the item at index 5, there are only 5 items left, and the highest valid index is 4, so it will fail.
The correct code is:
while getListViewItemCount(listview) > 0
removeListViewItem listview,0
endwhile
Which removes the first item in the list until there are no more left.
Here is some code to demonstrate:
for i = 0 to 100
addListViewItem listview,"Item #"+str$(i),0
next i
wait key
while getListViewItemCount(listview) > 0
removeListViewItem listview,0
endwhile
wait key
BlueGUI Windows Plugin