|
Syntax:
|
FILEDIALOG(<Header>,<Filter>,<Default
Directory>,<Default Filename>,<Default Extension>
[,<Filter Index>[,<Multiple Selection>[,<Separator>[,<Save>[,<Standard Dialog>[,<New Folder>]]]]]])
|
<Header>
|
= <STRING-EXPRESSION>
|
|
<Filter>
|
= <STRING-EXPRESSION>
|
|
<Default Directory>
|
= <STRING-EXPRESSION>
|
|
<Default Filename>
|
= <STRING-EXPRESSION>
|
|
<Default Extension>
|
= <STRING-EXPRESSION>
|
|
<Filter Index>
|
= <NUM-EXPRESSION>
|
|
<Multiple Selection>
|
= <NUM-EXPRESSION>
|
|
<Separator>
|
= <STRING-EXPRESSION>
|
|
<Save>
|
= <NUM-EXPRESSION>
|
|
<Standard Dialog>
|
= <NUM-EXPRESSION>
|
|
<New Folder>
|
= <NUM-EXPRESSION>
|
|
|
|
|
|
Meaning:
|
Calls the standard file dialog for selection
of a file or a directory.
After the dialog has been closed EBUS_DATA contains the status and EBUS_DATA$
contains the selected file-/ directory name.
|
Value
of EBUS_DATA
|
Meaning
|
|
0
|
The dialog has been cancelled.
|
|
1
|
EBUS_DATA$
contains the selected file-/ directory name.
|
|
-1
|
Runtime error
|
Note: With
Java-2T-programs the files are selected on the Server! With the instruction FILEDIALOG_CLIENT files can be selected
on the Client computer.
|
|
Parameter:
|
Header
|
Specifies the header of the dialog.
|
Filter
|
Pairs of strings must be specified
respectively, the separator is "|".
Example:
"Programs|*.exe|All Files|*.*". In the dialog box the filters are
then displayed with File Type as shown below:
Programs (*.exe)
All files (*.*)
If <FILTER> = "", only a
directory but no file can be selected.
|
Default Directory
|
Specifies the default directory. If the empty string
"" is put in, the current directory is set.
|
Default Filename
|
Specifies the default setting in the field Filename
.
|
Default Extension
|
Specifies the file name extension, which is
automatically added to the filename if a filename is entered without
extension.
|
Filter Index
|
Defines which <Filter> pair is used
as default setting in the dialog.
|
Multiple Selection
|
0: Only one file can be selected.
<> 0: Several files can be selected. The
single filenames are separated by the first character of <Separator>.
If this parameter is missing or if <Separator> is the empty string
"", the semi-colon ";" is used as separator.
Multiple selection is not possible with
directories, only with files.
|
Separator
|
Specifies the separator by which several
selected files are separated.
|
Save
|
0: The Select button has the text 'Open'.
<> 0: The Select button has the text
'Save'.
If this parameter is missing, then this is
equivalent to 0.
|
Standard Dialog
|
0:
A dialog created by EBUS-J is displayed.
With the EBUS-J-Dialog the program remembers the
size and the directory that was used last. Moreover the number of files in
the directory is shown. In the 2T-program the EBUS-J-Dialog is always
opened since the Java file dialog cannot display files from the Server.
2:
The standard file dialog of the operating system is displayed. Attention:
The parameter <Filter> has no effect.
otherwise:
The Java standard dialog is displayed.
The absence of this parameter is equivalent
to 0.
|
New Folder
|
0: The button 'Create new folder' is
disabled.
<> 0: The button 'Create new folder'
is enabled. New folders can be created.
|
|
|
Sample:
|
FILEDIALOG("Select file",
"Programs|*.exe|Images|*.gif;*.png;*.jpg|All
files|*.*",
"" , "" , ""
, 2 , 0 , "" ,
0 , 1)
IF EBUS_DATA
= 1
THEN FILE$ = EBUS_DATA$
ENDIF
|
|
See also:
|
FILEDIALOG_CLIENT
EBUS_DATA
EBUS_DATA$
|