constants StateChangeEnum
Specifies the new state of the control. Use the StateChange event to notify your application when the control's state is changed.

 NameValueDescription 
   RenameState0 Fired when a file is renamed.  
   SetFocusState1 The control gains the focus.  
   KillFocusState2 The control loses the focus.  
   SelChangeState3 Fired when the control's selection has been changed.  
   BrowseChangeState4 Occurs when the control browses a new folder.  
   RefreshState5 Occurs after control refreshes the list of files.  
   UpdateChangeState6 Fired when the browsed folder suffers a change.  
   BeforeFilterChangeState7 Fired just before starting filtering the files.  
   AfterFilterChangeState8 Fired after control has filtered the files.  

The following VB sample enumerates the selected items:

Private Sub ExFileView1_StateChange(ByVal State As EXFILEVIEWLibCtl.StateChangeEnum)
    If State = SelChangeState Then
        Dim fs As Files, f As File
        Set fs = ExFileView1.Get(SelItems)
        For Each f In fs
            Debug.Print f.Name
        Next
    End If
End Sub

The following C++ sample enumerates the selected items:

void OnStateChangeExfileview1(long State) 
{
	switch ( State )
	{
		case 0: /*StartSearching*/
		{
			OutputDebugString( "Start searching" );
			break;
		}
		case 1: /*EndSearching*/
		{
			OutputDebugString( "End searching" );
			break;
		}
	}
}

The following VB.NET sample enumerates the selected items:

Private Sub AxExFileView1_StateChange(ByVal sender As Object, ByVal e As AxEXFILEVIEWLib._IExFileViewEvents_StateChangeEvent) Handles AxExFileView1.StateChange
    Select Case e.state
        Case EXFILEVIEWLib.StateChangeEnum.SelChangeState
            With AxExFileView1.get_Get(EXFILEVIEWLib.TypeEnum.SelItems)
                Dim i As Integer
                For i = 0 To .Count - 1
                    With .Item(i)
                        Debug.WriteLine(.Name)
                    End With
                Next
            End With
    End Select
End Sub

The following C# sample enumerates the selected items:

private void axExFileView1_StateChange(object sender, AxEXFILEVIEWLib._IExFileViewEvents_StateChangeEvent e)
{
	switch (e.state)
	{
		case EXFILEVIEWLib.StateChangeEnum.SelChangeState:
		{
			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);
			}
			break;
		}
	}
}

The following VFP sample enumerates the selected items:

*** ActiveX Control Event ***
LPARAMETERS state

do case 

 case state = 3 && SelChangeState
 with thisform.ExFileView1.Get( 0 ) && SelItems
 	local i
 	for i = 0 to .Count - 1
		with .Item(i)
			wait window nowait .Name
		endwith 		
 	next
 endwith	
 
endcase


Send comments on this topic.
© 1999-2006 Exontrol Inc, Software. All rights reserved.