event AddGroup (Group as Group)
Occurs when a new group is added to the Groups collection.

 TypeDescription 
   Group as Group A Group object being added.  
Use the AddGroup event to notify your application that a new group is to Groups collection. The Add method adds a new group to Groups collection. Use the AddGroup event to associate an extra data to the group. Use the AddItem, InsertItem, InsertControlItem, PutItems or DataSource methods to add new items to the group.

The following sample changes the background and foreground colors of each group being added:

Private Sub ExplorerTree1_AddGroup(ByVal Group As EXPLORERTREELibCtl.IGroup)
    With Group
        .BackColor = vbBlue
        .ForeColor = vbWhite
    End With
End Sub 

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