From Xojo Documentation
Supported PlatformsProject Types: Desktop Platforms: macOS, Windows, Linux
Used to create and present customized Select Folder dialog boxes. The non-customized version of this function is provided by the SelectFolder function.
Using the properties of the FolderItemDialog class, you can customize the following aspects of a select-folder dialog box:
- Position (Left and Top properties)
- Default directory (Initial Directory property)
- Valid file types to show (Filter property)
- Text of the Validate and Cancel buttons (ActionButtonCaption and CancelButtonCaption properties).
- Text that appears in the Title bar of the dialog (Title property)
- Text that appears in the body of the dialog (PromptText property)
The following example opens a select folder dialog box and presents the contents of the "Documents" directory on the user's startup volume in the browser:
dlg.ActionButtonCaption = "Select"
dlg.Title = "Title Property"
dlg.PromptText = "Prompt Text"
dlg.InitialDirectory = SpecialFolder.Documents
Dim f As FolderItem
f = dlg.ShowModal
If f <> Nil Then
// Use the folderitem here
// User cancelled