Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listview will not clear

Status
Not open for further replies.

DerPflug

Programmer
Mar 28, 2002
153
US
I have a form on which is a listview control that is refreshed by a timer every 10 seconds. Before I enter the code to populate the listview I call

listview1.items.clear()

but the listview does not clear. If I add a button to the form and add that code beneath the click event it works. What could be wrong?
 
We would probably have to see the rest of the sub calling it to decipher the problem, but it could be that the listview1 is data bound and it's double populating???
 
what is actually happening? does it keep adding the new items on top of the old or does it just seem to add all the items twice for each population?

As a long shot try ...
Code:
listview1.refresh
application.doevents

after clearing and before populating
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top