event Expand (NewNode as Node)
Occurs when the user expands or collapses a node.

TypeDescription
NewNode as Node A Node object being expanded or collapsed.
Use the Expand event to notify your application that user expands or collapses a node. Use the HasButtons property to display +/- buttons for nodes that contain child nodes. Use the HasButton property to hide the +/- button for a particular node. Use the Expanded property to programmatically expand a node. Use the SelectNode property to select a node. Use the EnsureVisibleNode method to ensure that a node fits the control's visible client area. Use the ExpandOnDblClick property to specify whether a node is expanded or collapsed when the user double clicks it.

Syntax for Expand event, /NET version, on:

private void Expand(object sender,exontrol.EXORGCHARTLib.Node NewNode)
{
}

Private Sub Expand(ByVal sender As System.Object,ByVal NewNode As exontrol.EXORGCHARTLib.Node) Handles Expand
End Sub

Syntax for Expand event, /COM version, on:

private void Expand(object sender, AxEXORGCHARTLib._IChartViewEvents_ExpandEvent e)
{
}

void OnExpand(LPDISPATCH NewNode)
{
}

void __fastcall Expand(TObject *Sender,Exorgchartlib_tlb::INode *NewNode)
{
}

procedure Expand(ASender: TObject; NewNode : INode);
begin
end;

procedure Expand(sender: System.Object; e: AxEXORGCHARTLib._IChartViewEvents_ExpandEvent);
begin
end;

begin event Expand(oleobject NewNode)
end event Expand

Private Sub Expand(ByVal sender As System.Object, ByVal e As AxEXORGCHARTLib._IChartViewEvents_ExpandEvent) Handles Expand
End Sub

Private Sub Expand(ByVal NewNode As EXORGCHARTLibCtl.INode)
End Sub

Private Sub Expand(ByVal NewNode As Object)
End Sub

LPARAMETERS NewNode

PROCEDURE OnExpand(oChartView,NewNode)
RETURN

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

<SCRIPT EVENT="Expand(NewNode)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Expand(NewNode)
End Function
</SCRIPT>

Procedure OnComExpand Variant llNewNode
	Forward Send OnComExpand llNewNode
End_Procedure

METHOD OCX_Expand(NewNode) CLASS MainDialog
RETURN NIL

void onEvent_Expand(COM _NewNode)
{
}

function Expand as v (NewNode as OLE::Exontrol.ChartView.1::INode)
end function

function nativeObject_Expand(NewNode)
return

The following VB sample selects and ensures that the node being expanded is visible:

Private Sub ChartView1_Expand(ByVal NewNode As EXORGCHARTLibCtl.INode)
    With ChartView1
        .EnsureVisibleNode NewNode
        .SelectNode = NewNode
    End With
End Sub

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

void OnExpandChartview1(LPDISPATCH NewNode) 
{
	CNode node( NewNode ); node.m_bAutoRelease = FALSE;
	OutputDebugString( node.GetCaption() );
}

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

Private Sub AxChartView1_Expand(ByVal sender As Object, ByVal e As AxEXORGCHARTLib._IChartViewEvents_ExpandEvent) Handles AxChartView1.Expand
    Debug.WriteLine(e.newNode.Caption)
End Sub

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

private void axChartView1_Expand(object sender, AxEXORGCHARTLib._IChartViewEvents_ExpandEvent e)
{
	System.Diagnostics.Debug.WriteLine(e.newNode.Caption);
}

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

*** ActiveX Control Event ***
LPARAMETERS newnode

with newnode
	wait window nowait .Caption
endwith