Difference between revisions of "GETFILE()"
From Lianjapedia
Helen.george (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
− | GETFILE([<expC1> | + | GETFILE([<expC1> [, <expC2> [, <expC3> [, <expN1> [, <expC4>]]]]]) |
==See Also== | ==See Also== | ||
Line 14: | Line 14: | ||
!width="25%"|Parameters||width="15%"|Required||Description | !width="25%"|Parameters||width="15%"|Required||Description | ||
|- | |- | ||
− | |valign="top"|<expC1>||valign="top"|No||A file extension skeleton. If specified only files with this extension are shown | + | |valign="top"|<expC1>||valign="top"|No||A file extension skeleton. If specified, only files with this extension are shown. To allow the user to select a file type using the pulldown, multiple skeletons should be listed as follows:<br>"Visual FoxPro(*.prg);;Python(*.py);;JavaScript(*.js);;PHP(*.php);;"<br>Omit the final ';;' to prevent 'all files' from being selectable. |
|- | |- | ||
− | |valign="top"|<expC2>||valign="top"|No||The text to display | + | |valign="top"|<expC2>||valign="top"|No||The text to display for the File name label. This is ignored, it is always labeled 'File name'. |
|- | |- | ||
− | |valign="top"|<expC3>||valign="top"|No||The text to display on the | + | |valign="top"|<expC3>||valign="top"|No||The text to display on the Open button. This is ignored, the button is always labeled 'Open'. |
|- | |- | ||
− | |valign="top"|<expN1>||valign="top"|No||The buttons | + | |valign="top"|<expN1>||valign="top"|No||The buttons to be displayed. This is ignored, the buttons are always 'Open' and 'Cancel'. |
+ | |- | ||
+ | |valign="top"|<expC4>||valign="top"|No||The text to display at the top of the dialog. If not specified, 'lianja' is displayed. | ||
|- | |- | ||
|} | |} | ||
Line 26: | Line 28: | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | + | cScript = getfile("Visual FoxPro(*.prg);;Python(*.py);;JavaScript(*.js);;PHP(*.php)","","",0,"Select a script") | |
</code> | </code> | ||
Latest revision as of 06:23, 30 May 2013
Contents
Purpose
Function to display an Open dialog allowing a filename to be selected and returned.
Syntax
GETFILE([<expC1> [, <expC2> [, <expC3> [, <expN1> [, <expC4>]]]]])
See Also
GETDIR(), LOCFILE(), PUTFILE()
Description
The GETFILE() function displays an Open dialog allowing a filename to be selected and returned. The dialog allows navigation through directories and shows a list of relevant files in that directory. The cursor keys, Return key and tab key can be used to navigate the different sections under a character mode environment. If the user selects a file, the GETFILE() function returns the name of that file. If no file is selected, the GETFILE() function returns an empty string "".
Parameters | Required | Description |
---|---|---|
<expC1> | No | A file extension skeleton. If specified, only files with this extension are shown. To allow the user to select a file type using the pulldown, multiple skeletons should be listed as follows: "Visual FoxPro(*.prg);;Python(*.py);;JavaScript(*.js);;PHP(*.php);;" Omit the final ';;' to prevent 'all files' from being selectable. |
<expC2> | No | The text to display for the File name label. This is ignored, it is always labeled 'File name'. |
<expC3> | No | The text to display on the Open button. This is ignored, the button is always labeled 'Open'. |
<expN1> | No | The buttons to be displayed. This is ignored, the buttons are always 'Open' and 'Cancel'. |
<expC4> | No | The text to display at the top of the dialog. If not specified, 'lianja' is displayed. |
Example
cScript = getfile("Visual FoxPro(*.prg);;Python(*.py);;JavaScript(*.js);;PHP(*.php)","","",0,"Select a script")