GetFolder PowerScript function
Description
Displays a folder
selection dialog box.
Syntax
|
1 |
<span>GetFolder</span> ( <span>title</span>, <span>directory</span> ) |
|
Argument |
Description |
|---|---|
|
title |
String for a title that displays above |
|
directory |
String for the directory name passed |
Return Values
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
Sybase directory in a folder selection dialog box. The string passed
in the title argument displays above the tree
view:
|
1 |
string ls_path = "d:program filessybase" |
|
1 |
integer li_result |
|
1 |
li_result = <span>GetFolder</span>( "my targets", ls_path ) |
|
1 |
sle_1.text=ls_path |
|
1 |
// puts the user-selected path in a SingleLineEdit box. |