Name | Value | Description | |||
RenameState | 0 | Fired when a file is renamed. This notification is not fired if an outside process change or renames a file in the current view. This notification is sent only if the file is renamed inside the current control. | |||
SetFocusState | 1 | The control gains the focus. | |||
KillFocusState | 2 | The control loses the focus. | |||
SelChangeState | 3 | Fired when the control's selection is changed. Use the Get method to collect the selected files/folders. | |||
BrowseChangeState | 4 | Occurs when the control browses a new folder. The BrowseFolderPath property indicates the folder being browsed. | |||
RefreshState | 5 | Notifies the application once the Refresh method is invoked. | |||
UpdateChangeState | 6 | Fired when the browsed folder suffers a change ( like an outside process renamed, deleted or added a file ). | |||
BeforeFilterChangeState | 7 | Fired just before starting filtering the files. This notifies your application once the control starts filtering files and folders based on the UI actions. | |||
AfterFilterChangeState | 8 | Fired after control has filtered the files. This notifies your application once the control starts filtering files and folders based on the UI actions. | |||
BeforeLoadState | 9 | Notifies the application once the control starts loading the objects ( the name of the objects ). | |||
AfterLoadState | 10 | Notifies the application once the control ends loading the objects ( the name of the objects ). Even if this state is fired, the control still can look for information about current files or folders until the ReadyState is sent. | |||
BeforeExpandFolderState | 11 | Notifies the application once a folder is expanding. Use this notification to do your work before expanding an item. | |||
AfterExpandFolderState | 12 | Notifies the application once a folder is expanded. Use this notification to do your work after an item is expanded. | |||
BeforeCollapseFolderState | 13 | Notifies the application once a folder is collapsing. Use this notification to do your work before collapsing an item. | |||
AfterCollapseFolderState | 14 | Notifies the application once a folder is collapsed. Use this notification to do your work after an item is collapsed. | |||
CheckStateChange | 15 | Fired when the object's checkbox is changed. | |||
BusyState | 16 | The BusyState event occurs once the control starts collecting information for current files and folders. This event notifies your application once the control start loading information about This state may occurs only if the Asynchronous property is set on true. | |||
ReadyState | 17 | The ReadState event occurs once the control ends collecting information for current files and folders. This event notifies that the control is ready, in other words, all information about current view is loaded. This state may occurs only if the Asynchronous property is set on true. | |||
StartFromToState | 18 | Occurs when the control starts applying the From/To format. | |||
EndFromToState | 19 | Occurs when the control ends applying the From/To format. | |||
ShowContextMenu | 20 | Occurs when the control is about to display the object's context menu. The ShowContextMenu property indicates the items to be displayed on the object's context menu. The ShowContextMenu property has effect only during the StateChange event, when the State parameter is ShowContextMenu. The ShowContextMenu property can be used to disable, update, remove or add new items. The AllowMenuContext property specifies whether the control shows the object's context menu when the user presses the right click over a file or folder. | |||
ExecuteContextMenu | 21 | Occurs when the control is about to execute a command from the object's context menu. The event occurs before executing the command selected from the context menu. The ExecuteContextMenu property specifies the identifier of the command to be executed ( id option in the ShowContextMenu property). The ExecuteContextMenu property has effect only during the StateChange event, when the State parameter is ExecuteContextMenu. The AllowMenuContext property specifies whether the control shows the object's context menu when the user presses the right click over a file or folder. | |||
LoadingState | 22 | The LoadingState event occurs several time while the control loads files or folders. |
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