Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

FileDialog.SelectItemDialog

Shows dialog to select either file or folder.

Component Version macOS Windows Linux Server iOS SDK
FileDialog 2.7 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No
MBS( "FileDialog.SelectItemDialog" )

Parameters

none

Result

Returns "OK", "Cancel" or an error.

Description

Shows dialog to select either file or folder.
If dialog finishes well, you can query paths.

To select just a file, please use FileDialog.OpenFileDialog function.
Calls FileDialog.OpenFileDialog on Windows.

Examples

Run Select Item Dialog:

Delete All Records [No dialog]
Set Variable [$r; Value:MBS("FileDialog.Reset")]
Set Variable [$r; Value:MBS("FileDialog.SetShowHidden"; FileDialog::ShowHidden)]
Set Variable [$r; Value:MBS("FileDialog.SetAllowMulti"; FileDialog::AllowMulti)]
Set Variable [$r; Value:MBS("FileDialog.SetResolvesAliases"; FileDialog::ResolvesAliases)]
Set Variable [$r; Value:MBS("FileDialog.SetTreatsFilePackagesAsDirectories"; FileDialog::TreatsFilePackagesAsDirectories)]
Set Variable [$r; Value:MBS("FileDialog.SetCanSelectHiddenExtension"; FileDialog::CanSelectHiddenExtension)]
Set Variable [$r; Value:MBS("FileDialog.SetWindowTitle"; FileDialog::WindowTitle)]
Set Variable [$r; Value:MBS("FileDialog.SetInitialDirectory"; FileDialog::InitialDirectory)]
Set Variable [$r; Value:MBS("FileDialog.SetNameFieldLabel"; FileDialog::NameFieldLabel)]
Set Variable [$r; Value:MBS("FileDialog.SetPrompt"; FileDialog::Prompt)]
Set Variable [$r; Value:MBS("FileDialog.SetMessage"; FileDialog::Message)]
Set Variable [$r; Value:MBS("FileDialog.SetNameFieldStringValue"; FileDialog::NameFieldStringValue)]
Set Variable [$r; Value:MBS("FileDialog.SelectItemDialog")]
If [$r = "OK"]
    Set Variable [$index; Value:0]
    Set Variable [$count; Value:MBS("FileDialog.GetPathCount")]
    Loop
        New Record/Request
        Set Field [FileDialog::Path; MBS("FileDialog.GetPath"; $index)]
        Commit Records/Requests []
        Set Variable [$index; Value:$index + 1]
        Exit Loop If [$index = $count]
    End Loop
End If

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 17th June 2018


FileDialog.SelectFolderDialog - FileDialog.SetAllowMulti