event AddItem (Group as Group, Item as HITEM)
Occurs after a new Item is inserted to the Items collection.

 TypeDescription 
   Group as Group A Group object where the newly item is inserted  
   Item as HITEM A long expression that indicates the handle of the item that's inserted to the Items collection.  
The AddItem event notifies your application that a new items is inserted to the group. Use the AddItem, InsertItem, InsertControlItem, PutItems or DataSource methods to add new items to the group. Use the Add method to add new columns to Columns Collection.

The following sample changes the bolds the first column in the group, only if the group contains multiple columns:

Private Sub ExplorerTree1_AddItem(ByVal Group As EXPLORERTREELibCtl.IGroup, ByVal Item As EXPLORERTREELibCtl.HITEM)
    If (Group.Columns.Count > 1) Then
        With Group.Items
            .CellBold(Item, 0) = True
        End With
    End If
End Sub

Send comments on this topic.
© 1999-2008 Exontrol Inc, Software. All rights reserved.