event AfterExpandItem (Group as Group, Item as HITEM)
Fired after an item is expanded (collapsed).

TypeDescription
Group as Group A Group object where the item is expanded or collapsed.
Item as HITEM A long expression that indicates the item's handle that indicates the item expanded or collapsed.
The AfterExapndItem event notifies your application that an item is collapsed or expanded. Use the ExpandItem method to programmatically expand or collapse an item.  Use the BeforeExpandItem event to cancel expanding or collapsing items.

Syntax for AfterExpandItem event, /NET version, on:

private void AfterExpandItem(object sender,exontrol.EXPLORERTREELib.Group Group,int Item)
{
}

Private Sub AfterExpandItem(ByVal sender As System.Object,ByVal Group As exontrol.EXPLORERTREELib.Group,ByVal Item As Integer) Handles AfterExpandItem
End Sub

Syntax for AfterExpandItem event, /COM version, on:

private void AfterExpandItem(object sender, AxEXPLORERTREELib._IExplorerTreeEvents_AfterExpandItemEvent e)
{
}

void OnAfterExpandItem(LPDISPATCH Group,long Item)
{
}

void __fastcall AfterExpandItem(TObject *Sender,Explorertreelib_tlb::IGroup *Group,Explorertreelib_tlb::HITEM Item)
{
}

procedure AfterExpandItem(ASender: TObject; Group : IGroup;Item : HITEM);
begin
end;

procedure AfterExpandItem(sender: System.Object; e: AxEXPLORERTREELib._IExplorerTreeEvents_AfterExpandItemEvent);
begin
end;

begin event AfterExpandItem(oleobject Group,long Item)
end event AfterExpandItem

Private Sub AfterExpandItem(ByVal sender As System.Object, ByVal e As AxEXPLORERTREELib._IExplorerTreeEvents_AfterExpandItemEvent) Handles AfterExpandItem
End Sub

Private Sub AfterExpandItem(ByVal Group As EXPLORERTREELibCtl.IGroup,ByVal Item As EXPLORERTREELibCtl.HITEM)
End Sub

Private Sub AfterExpandItem(ByVal Group As Object,ByVal Item As Long)
End Sub

LPARAMETERS Group,Item

PROCEDURE OnAfterExpandItem(oExplorerTree,Group,Item)
RETURN

Syntax for AfterExpandItem event, /COM version (others), on:

<SCRIPT EVENT="AfterExpandItem(Group,Item)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function AfterExpandItem(Group,Item)
End Function
</SCRIPT>

Procedure OnComAfterExpandItem Variant llGroup HITEM llItem
	Forward Send OnComAfterExpandItem llGroup llItem
End_Procedure

METHOD OCX_AfterExpandItem(Group,Item) CLASS MainDialog
RETURN NIL

void onEvent_AfterExpandItem(COM _Group,int _Item)
{
}

function AfterExpandItem as v (Group as OLE::Exontrol.ExplorerTree.1::IGroup,Item as OLE::Exontrol.ExplorerTree.1::HITEM)
end function

function nativeObject_AfterExpandItem(Group,Item)
return

The following sample shows how to cancel expanding or collapsing items:

Private Sub ExplorerTree1_BeforeExpandItem(ByVal Group As EXPLORERTREELibCtl.IGroup, ByVal Item As EXPLORERTREELibCtl.HITEM, Cancel As Variant)
    Cancel = True
End Sub

The following sample prints the item's state when it is expanded or collapsed:

Private Sub ExplorerTree1_AfterExpandItem(ByVal Group As EXPLORERTREELibCtl.IGroup, ByVal Item As EXPLORERTREELibCtl.HITEM)
    Debug.Print "The " & Item & " item is " & IIf(Group.Items.ExpandItem(Item), "expanded", "collapsed")
End Sub