From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
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 (InitialFolder 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.InitialFolder = SpecialFolder.Documents
Var f As FolderItem
f = dlg.ShowModal
If f <> Nil Then
// Use the folderitem here
// User cancelled