Author | Message | Time |
---|---|---|
UnLeaDeD | Hey Guys, I have tried to remove duplicate strings in listview......but have failed any hints tips or help? | June 28, 2005, 4:25 AM |
PaiD | All you need to do is compare what you want to add to what is in it @ the current time. [code] Dim I as Integer For I = 1 to Listview.ListItems.Count If LCase(Hm1) <> LCase(Listview.ListItems.Item(I)) Then 'It isnt in the listview. Add it then End if Next I [/code] Hm1 is a String and it contains what you want to add to the listview Edit: I guess your using Visual Basic but if your not then the idea would be the same. Edit 2: Listviews are only in Visual Basic correct? | June 28, 2005, 4:32 AM |
Ringo | Have you tryed setting the sortted propertie to true? Dupes should then be on top of each other and should beable to be removed by checking the next index with a loop based on the listviews count. | June 28, 2005, 4:33 AM |
Kp | [quote author=DueL link=topic=12004.msg117851#msg117851 date=1119933145]Edit 2: Listviews are only in Visual Basic correct?[/quote] No, they're a standard Windows UI control. However, it's still quite likely the OP is using VB, as most C/C++ users capable of populating a listview could've figured out the solution on their own. :) | June 28, 2005, 4:52 AM |