event AfterExpandItem (Item as HITEM)

Fired after an item is expanded (collapsed).

 TypeDescription 
   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. The ExpandItem property also specifies whether an item is expand or collapsed. The ItemChild property retrieves the first child item. Use the BeforeExpandItem event to cancel expanding or collapsing items. 

Syntax for AfterExpandItem event, /NET version, on:

private void AfterExpandItem(object sender,int Item)
{
}

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

Syntax for AfterExpandItem event, /COM version, on:

private void AfterExpandItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AfterExpandItemEvent e)
{
}

void OnAfterExpandItem(long Item)
{
}

void __fastcall AfterExpandItem(TObject *Sender,Exg2anttlib_tlb::HITEM Item)
{
}

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

procedure AfterExpandItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AfterExpandItemEvent);
begin
end;

begin event AfterExpandItem(long Item)
end event AfterExpandItem

Private Sub AfterExpandItem(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_AfterExpandItemEvent) Handles AfterExpandItem
End Sub

Private Sub AfterExpandItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
End Sub

Private Sub AfterExpandItem(ByVal Item As Long)
End Sub

LPARAMETERS Item

PROCEDURE OnAfterExpandItem(oG2antt,Item)
RETURN

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

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

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

Procedure OnComAfterExpandItem HITEM llItem
	Forward Send OnComAfterExpandItem llItem
End_Procedure

METHOD OCX_AfterExpandItem(Item) CLASS MainDialog
RETURN NIL

void onEvent_AfterExpandItem(int _Item)
{
}

function AfterExpandItem as v (Item as OLE::Exontrol.G2antt.1::HITEM)
end function

function nativeObject_AfterExpandItem(Item)
return

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

Private Sub G2antt1_AfterExpandItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
    Debug.Print "The " & Item & " item was " & IIf(G2antt1.Items.ExpandItem(Item), "expanded", "collapsed")
End Sub

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

private void axG2antt1_AfterExpandItem(object sender, AxEXG2ANTTLib._IG2anttEvents_AfterExpandItemEvent e)
{
	System.Diagnostics.Debug.WriteLine( axG2antt1.Items.get_ExpandItem( e.item) ? "expanded" : "collapsed" );
}

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

Private Sub AxG2antt1_AfterExpandItem(ByVal sender As Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_AfterExpandItemEvent) Handles AxG2antt1.AfterExpandItem
    Debug.WriteLine(IIf(AxG2antt1.Items.ExpandItem(e.item), "expanded", "collapsed"))
End Sub

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

void OnAfterExpandItemG2antt1(long Item) 
{
	CItems items = m_g2antt.GetItems();
	CString strFormat;
	strFormat.Format( "%s", items.GetExpandItem( Item ) ? "expanded" : "collapsed" );
	OutputDebugString( strFormat );
}

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

*** ActiveX Control Event ***
LPARAMETERS item

with thisform.G2antt1.Items
	if ( .ExpandItem(item) )
		wait window "expanded" nowait
	else
		wait window "collapsed" nowait
	endif
endwith

 


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.