Posted By

CaptainProton on 01/24/10


clear TreeView nodes

Versions (?)


 / 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
  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.