SELECTFOLDERDIALOG$: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
(Initial version) |
m (Update optional args behavior) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:_SELECTFOLDERDIALOG$}} | {{DISPLAYTITLE:_SELECTFOLDERDIALOG$}} | ||
The '''_SELECTFOLDERDIALOG$''' function displays a dialog box that enables the user to select a folder (directory). The returned string is a folder path or an empty string ('''""''') if the user cancelled. | The '''_SELECTFOLDERDIALOG$''' function displays a dialog box that enables the user to select a folder (directory). The returned string is a folder path or an empty string ('''""''') if the user cancelled. | ||
{{PageSyntax}} | {{PageSyntax}} | ||
:{{Parameter|folder$}} = [[_SELECTFOLDERDIALOG$]]({{Parameter|title$}}[, {{Parameter|defaultPath$}}]) | :{{Parameter|folder$}} = [[_SELECTFOLDERDIALOG$]]([{{Parameter|title$}}][, {{Parameter|defaultPath$}}]) | ||
{{PageParameters}} | {{PageParameters}} | ||
* {{Parameter|title$}} is the dialog box | * {{Parameter|title$}} is a string that is displayed above the folder tree view in the dialog box | ||
* {{Parameter|defaultPath$}} is | * {{Parameter|defaultPath$}} is the default folder that is pre-selected (if the folder exists) | ||
{{PageDescription}} | {{PageDescription}} | ||
* All parameters accept an empty string ('''""''') in which case system defaults are used | * All parameters accept an empty string ('''""''') in which case system defaults are used | ||
* Use the | * Use the title$ to specify instructions to the user | ||
* The dialog box automatically becomes a modal window if the application window is visible | * The dialog box automatically becomes a modal window if the application window is visible | ||
* The folder selected must exist in the filesystem else an empty string is returned | * The folder selected must exist in the filesystem else an empty string is returned | ||
Line 19: | Line 20: | ||
{{PageAvailability}} | {{PageAvailability}} | ||
* '''QB64-PE v3.4 and up''' | * '''QB64-PE v3.4.0 and up''' | ||
Line 35: | Line 36: | ||
* [[_MESSAGEBOX (function)]] | * [[_MESSAGEBOX (function)]] | ||
* [[_INPUTBOX$]] | * [[_INPUTBOX$]] | ||
* [[_COLORCHOOSERDIALOG]] | |||
* [[_OPENFILEDIALOG$]] | * [[_OPENFILEDIALOG$]] | ||
* [[_SAVEFILEDIALOG$]] | * [[_SAVEFILEDIALOG$]] |
Latest revision as of 01:47, 3 June 2023
The _SELECTFOLDERDIALOG$ function displays a dialog box that enables the user to select a folder (directory). The returned string is a folder path or an empty string ("") if the user cancelled.
Syntax
- folder$ = _SELECTFOLDERDIALOG$([title$][, defaultPath$])
Parameters
- title$ is a string that is displayed above the folder tree view in the dialog box
- defaultPath$ is the default folder that is pre-selected (if the folder exists)
Description
- All parameters accept an empty string ("") in which case system defaults are used
- Use the title$ to specify instructions to the user
- The dialog box automatically becomes a modal window if the application window is visible
- The folder selected must exist in the filesystem else an empty string is returned
Availability
- QB64-PE v3.4.0 and up
Examples
- Example
- Folder selection
folder$ = _SELECTFOLDERDIALOG$("Select a folder to scan:") IF folder$ <> "" THEN _MESSAGEBOX "Information", "You selected " + folder$ |
See also
- _NOTIFYPOPUP
- _MESSAGEBOX
- _MESSAGEBOX (function)
- _INPUTBOX$
- _COLORCHOOSERDIALOG
- _OPENFILEDIALOG$
- _SAVEFILEDIALOG$