event BeforeExpandGroup (Group as Group, Cancel as Variant)
Occurs just before expanding or collapsing a group.

 TypeDescription 
   Group as Group A Group object being expanded or collapsed.  
   Cancel as Variant A boolean expression that indicates whether the expanding/collapsing operation is canceled.  
Use the BeforeExpandGroup event to disable expanding groups on the fly. Use the AllowExpand property to disable expanding or collapsing groups when user clicks the group's caption. The BeforeExandGroup event notifies your application that a group is expanding or collapsing. The control fires the AfterExpandGroup event after group is expanded or collapsed. Use the Expanded property to expand programmatically the group

The following sample disables expanding or collapsing the second group:

Private Sub ExplorerTree1_BeforeExpandGroup(ByVal Group As EXPLORERTREELibCtl.IGroup, Cancel As Variant)
    Cancel = Group.Index = 1
End Sub

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