Posted By

CaptainProton on 01/24/10


Tagged

clear TreeView nodes


Versions (?)

clearTreeView(Object)


 / Published in: Visual Basic
 

The usual Clear method for TreeViews is painfully slow; this is a quicker alternative. It clears all nodes in a TreeView.

  1. Private Sub clearTreeView(treeView_ As Object)
  2. Dim i As Long
  3.  
  4. For i = treeView_.Nodes.count To 1 Step -1
  5. treeView_.Nodes.Remove i
  6. Next i
  7. End Sub

Report this snippet  

You need to login to post a comment.