event ExpandGroup (Group as Group)
Occurs when a group is expanded or collapsed.

 TypeDescription 
   Group as Group A Group object being expanded or collapsed.  

Use the ExpandGroup event to notify your application that a group is expanded or collapsed. The BeforeExpandGroup event is fired just before expanding or collapsing a group. Use the DelayScroll property to specifies the delay used for animation during expanding or collapsing. Use the Expanded property to expand or collapse programmatically a group. Use the ExpandOnClick property to specify whether the user can expand or collapse the groups by clicking the caption of the group.

The following VB sample displays the caption of the group being expanded or collapsed:

Private Sub ExplorerBar1_ExpandGroup(ByVal Group As EXPLORERBARLibCtl.IGroup)
    With Group
        Debug.Print .Caption & " " & .Expanded
    End With
End Sub

The following C++ sample displays the caption of the group being expanded or collapsed:

void OnExpandGroupExplorerbar1(LPDISPATCH Group) 
{
	CGroup group( Group ); group.m_bAutoRelease = FALSE;
	CString strOutput;
	strOutput.Format("%s, %i", (LPCTSTR)group.GetCaption(), group.GetExpanded() );
	OutputDebugString( strOutput );		
}

The following VB.NET sample displays the caption of the group being expanded or collapsed:

private void axExplorerBar1_DblClick(object sender, AxEXPLORERBARLib._IExplorerBarEvents_DblClickEvent e)
{
	EXPLORERBARLib.Item item = axExplorerBar1.get_ItemFromPoint(e.x, e.y);
	if (item != null)
	{
		System.Diagnostics.Debug.WriteLine(item.Caption);
	}
}

The following C# sample displays the caption of the group being expanded or collapsed:

private void axExplorerBar1_ExpandGroup(object sender, AxEXPLORERBARLib._IExplorerBarEvents_ExpandGroupEvent e)
{
	string strOutput = e.group.Caption;
	strOutput += " " + e.group.Expanded.ToString();
	System.Diagnostics.Debug.WriteLine(strOutput);
}

The following VFP sample displays the caption of the group being expanded or collapsed:

*** ActiveX Control Event ***
LPARAMETERS group

with group
	wait window nowait .Caption
endwith


 


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