![]() | Type | Description | ||
| Group as Group | A Group object being expanded or collapsed. | |||
| Cancel as Boolean | A boolean expression that indicates whether the expanding/collapsing operation is canceled. |
The BeforeExandGroup event notifies your application that a group is expanding or collapsing. Use the BeforeExapndGroup event to cancel the expanding/collapsing operation. The control fires the ExpandGroup event after group is expanded or collapsed. Use the Expanded property to expand programmatically the group. Use the DisplayExpandIcon property to show or hide the expand icon on the group's caption.
The following VB sample disables expanding or collapsing the first group:
Private Sub ExplorerBar1_BeforeExpandGroup(ByVal Group As EXPLORERBARLibCtl.IGroup, Cancel As Boolean)
With Group
If .Index = 0 Then
Cancel = True
End If
End With
End SubThe following C++ sample disables expanding or collapsing the first group:
void OnBeforeExpandGroupExplorerbar1(LPDISPATCH Group, BOOL FAR* Cancel)
{
CGroup group( Group ); group.m_bAutoRelease = FALSE;
if ( group.GetIndex() == 0 )
*Cancel = TRUE;
}The following VB.NET sample disables expanding or collapsing the first group:
Private Sub AxExplorerBar1_BeforeExpandGroup(ByVal sender As Object, ByVal e As AxEXPLORERBARLib._IExplorerBarEvents_BeforeExpandGroupEvent) Handles AxExplorerBar1.BeforeExpandGroup
With e.group
If (.Index = 0) Then
e.cancel = True
End If
End With
End SubThe following C# sample disables expanding or collapsing the first group:
private void axExplorerBar1_BeforeExpandGroup(object sender, AxEXPLORERBARLib._IExplorerBarEvents_BeforeExpandGroupEvent e)
{
if (e.group.Index == 0)
e.cancel = true;
}The following VFP sample disables expanding or collapsing the first group:
*** ActiveX Control Event ***
LPARAMETERS group, cancel
With Group
If .Index = 0 Then
Cancel = .t.
EndIf
EndWith