Description
Displays a folder selection dialog box.
Syntax
GetFolder ( title, directory )
Argument |
Description |
---|---|
title |
String for a title that displays above a list box containing a tree view for folder selection. |
directory |
String for the directory name passed by reference to the folder selection dialog box. The directory name is selected, and its subfolders, if any, are displayed in a dialog box tree view. |
Return value
Integer.
Returns 1 if the function succeeds, 0 if the user selects cancel (or the dialog box is closed), -1 if an error occurs.
Usage
The directory selected by the user is returned in the same variable that is passed to the folder selection dialog box.
Examples
This example displays the folder contents of the Appeon directory in a folder selection dialog box. The string passed in the title argument displays above the tree view:
string ls_path = "d:\program files\appeon" integer li_result li_result = GetFolder( "my targets", ls_path ) sle_1.text=ls_path // puts the user-selected path in a SingleLineEdit box.
See also