event BeforeExpand (SelFolder as ExShellFolder, Cancel as Boolean)
Fired before folder is about to be expanded.

TypeDescription
SelFolder as ExShellFolder A Folder being expanded.
Cancel as Boolean A Boolean expression that indicates whether the operation is executed or canceled.
When the user double clicks on a folder, or on a 'plus' button next to folder, it expands. If it was already expanded, it collapses. When a folder expands, two events are fired. The BeforeExpand is fired before ExFolderView changes its structure, so additional functions can be executed. The AfterExpand event is fired after the structure has changed. Usually, expanding and collapsing folders will result in more or less folders visible after this event, so if additional code is required it should be put inside this event body.

Syntax for BeforeExpand event, /NET version, on:

private void BeforeExpand(object sender,exontrol.EXFOLDERVIEWLib.ExShellFolder SelFolder,ref bool Cancel)
{
}

Private Sub BeforeExpand(ByVal sender As System.Object,ByVal SelFolder As exontrol.EXFOLDERVIEWLib.ExShellFolder,ByRef Cancel As Boolean) Handles BeforeExpand
End Sub

Syntax for BeforeExpand event, /COM version, on:

private void BeforeExpand(object sender, AxEXFOLDERVIEWLib._IExFolderViewEvents_BeforeExpandEvent e)
{
}

void OnBeforeExpand(LPDISPATCH SelFolder,BOOL FAR* Cancel)
{
}

void __fastcall BeforeExpand(TObject *Sender,Exfolderviewlib_tlb::IExShellFolder *SelFolder,VARIANT_BOOL * Cancel)
{
}

procedure BeforeExpand(ASender: TObject; SelFolder : IExShellFolder;var Cancel : WordBool);
begin
end;

procedure BeforeExpand(sender: System.Object; e: AxEXFOLDERVIEWLib._IExFolderViewEvents_BeforeExpandEvent);
begin
end;

begin event BeforeExpand(oleobject SelFolder,boolean Cancel)
end event BeforeExpand

Private Sub BeforeExpand(ByVal sender As System.Object, ByVal e As AxEXFOLDERVIEWLib._IExFolderViewEvents_BeforeExpandEvent) Handles BeforeExpand
End Sub

Private Sub BeforeExpand(ByVal SelFolder As EXFOLDERVIEWLibCtl.IExShellFolder,Cancel As Boolean)
End Sub

Private Sub BeforeExpand(ByVal SelFolder As Object,Cancel As Boolean)
End Sub

LPARAMETERS SelFolder,Cancel

PROCEDURE OnBeforeExpand(oExFolderView,SelFolder,Cancel)
RETURN

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

<SCRIPT EVENT="BeforeExpand(SelFolder,Cancel)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function BeforeExpand(SelFolder,Cancel)
End Function
</SCRIPT>

Procedure OnComBeforeExpand Variant llSelFolder Boolean llCancel
	Forward Send OnComBeforeExpand llSelFolder llCancel
End_Procedure

METHOD OCX_BeforeExpand(SelFolder,Cancel) CLASS MainDialog
RETURN NIL

void onEvent_BeforeExpand(COM _SelFolder,COMVariant /*bool*/ _Cancel)
{
}

function BeforeExpand as v (SelFolder as OLE::Exontrol.FolderView.1::IExShellFolder,Cancel as L)
end function

function nativeObject_BeforeExpand(SelFolder,Cancel)
return