FolderItemDialog.InitialFolder

From Xojo Documentation

Property (As FolderItem )
aFolderItemDialog.InitialFolder = newFolderItemValue
or
FolderItemValue = aFolderItemDialog.InitialFolder

New in 2019r2

Supported for all project types and targets.

Full or relative path to the folder whose contents are displayed when the dialog first appears.

Notes

The Filter property controls which files within the folder are visible. On Windows, this defaults to the My Documents directory if no FolderItem is specified.

Example

This example illustrates all the labelling properties of a FolderItemDialog.

Var dlg As OpenDialog
Var f As FolderItem
dlg = New OpenDialog

#If Not (TargetLinux) then
dlg.InitialFolder = SpecialFolder.Documents
#Else //open Home directory on linux
dlg.InitialFolder = SpecialFolder.home
#Endif
f = dlg.ShowModal