PathChange Event

See AlsoKPEUE3              Example597P02P>Low

Applies To

File list box1M6S8UX.

Description

Occurs when the path1DDXNK6 changes by setting the FileNameJHVBZJ or PathBKGP79 properties from code.

Syntax

Sub ctlname_PathChange ([Index As Integer])

Remarks

The argument Index uniquely identifies a control if it is in a control array.8G7Y0UU  You can use a PathChange procedure to respond to path changes in a file list box.  When you assign a string containing a new path to the FileName property, the file list box control invokes the PathChange event.


See Also

Help:

FileName PropertyJHVBZJ

Path PropertyBKGP79

Pattern PropertyXYKZRG

PatternChange Event2JU7UW9

 

Programmer's Guide:

Chapter 18, "Using the File-System Controls"


PathChange Event Example

The example demonstrates how to update a label control to reflect the current path for a file list box.  Double-clicking a directory name displays a list of that directory's files in the file list box; it also displays the directory's complete path in the label control.  To try this example, paste the code into the Declarations section of a form that contains a label, a directory list box and a file list box.  Then press F5.

Sub File1_PathChange ()

   Label1.Caption = "Path: " & Dir1.Path ' Show path in label.

End Sub

 

Sub Dir1_Change ()

   File1.Path = Dir1.Path                ' Set file path.

End Sub

Sub Form_Load ()

   Label1.Caption = "Path: " & Dir1.Path ' Show path in label.

End Sub