event Click ()

Occurs when the user clicks the list.

 TypeDescription 

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. 

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



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