Occurs when the user clicks the list.
Type | Description |
Use the Click event to notify your application when the user clicks the list. Use Get property to retrieve the collection of selected items. Use the StateChange event to notify your application when the current selection is changed. Use the FileFromPoint property to retrieve the file from the cursor. Use the MouseDown or MouseUp event to notify your application when the user presses or releases the one of the mouse buttons.
Syntax for Click event, /NET version, on:
private void Click(object sender) { } Private Sub Click(ByVal sender As System.Object) Handles Click End Sub |
private void ClickEvent(object sender, EventArgs e) { } void OnClick() { } void __fastcall Click(TObject *Sender) { } procedure Click(ASender: TObject; ); begin end; procedure ClickEvent(sender: System.Object; e: System.EventArgs); begin end; begin event Click() end event Click Private Sub ClickEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClickEvent End Sub Private Sub Click() End Sub Private Sub Click() End Sub LPARAMETERS nop PROCEDURE OnClick(oExFileView) RETURN |
<SCRIPT EVENT="Click()" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function Click() End Function </SCRIPT> Procedure OnComClick Forward Send OnComClick End_Procedure METHOD OCX_Click() CLASS MainDialog RETURN NIL void onEvent_Click() { } function Click as v () end function function nativeObject_Click() return |
The following VB sample prints the selected file or folder, when the user clicks the control's list:
Private Sub ExFileView1_Click() Dim fs As Files, f As File Set fs = ExFileView1.Get(SelItems) For Each f In fs Debug.Print f.Name Next End Sub
The following C++ sample prints the selected file or folder, when the user clicks the control's list:
void OnClickExfileview1() { CFiles files = m_fileview.GetGet( 0 /*SelItems*/ ); for ( long i = 0; i < files.GetCount(); i++ ) { CFile1 file = files.GetItem( COleVariant( i ) ); OutputDebugString( file.GetName() ); } }
The following VB.NET sample prints the selected file or folder, when the user clicks the control's list:
Private Sub AxExFileView1_ClickEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxExFileView1.ClickEvent Dim f As EXFILEVIEWLib.File For Each f In AxExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.SelItems) Debug.WriteLine(f.Name) Next End Sub
The following C# sample prints the selected file or folder, when the user clicks the control's list:
private void axExFileView1_ClickEvent(object sender, EventArgs e) { EXFILEVIEWLib.Files files = axExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.SelItems); for (int i = 0; i < files.Count; i++) { EXFILEVIEWLib.File file = files[i]; System.Diagnostics.Debug.WriteLine(file.Name); } }
The following VFP sample prints the selected file or folder, when the user clicks the control's list:
*** ActiveX Control Event *** with thisform.ExFileView1.Get(0) local i for i = 0 to .Count - 1 with .Item(i) wait window nowait .Name endwith next endwith