Removes a specific item.


| Type | Description | |||
| Item as HITEM | A long expression that indicates the handle of the item being removed. |
The following sample shows how to remove the first item in the group: Group.Items.RemoveItem Group.Items(0). To remove all items in the collection you can use RemoveAllItems method. The RemoveItem method doesn't remove recursively the item.
The following removes recursively an item:
Private Sub RemoveItemRec(ByVal g As EXPLORERTREELibCtl.Group, ByVal h As EXPLORERTREELibCtl.HITEM)
With g.Items
g.BeginUpdate
If (.ChildCount(h) > 0) Then
Dim hChild As HITEM
hChild = .ItemChild(h)
While (hChild <> 0)
Dim hNext As HITEM
hNext = .NextSiblingItem(hChild)
RemoveItemRec g, hChild
hChild = hNext
Wend
End If
.RemoveItem h
g.EndUpdate
End With
End Sub