| Documentation by John Kelly | QFILEDIALOG |
| Field | Type | R/W | Default |
| Caption | STRING | RW | "Open" |
| DefaultExt | STRING Default extension that will be automatically added to filename if user doesn't include it. |
RW | |
| FileName | STRING Returns file name with path information | RW | |
| FileTitle | STRING Returns the file name without path information | R | |
| Files() | Array of STRING If Mode = fdOpen,and MultiSelect = True,then the array has a list of selected files. Files(0) is the directory, Files(1) is the first file name without the path | RW | All Files|*.* |
| Filter | STRING | RW | All Files|*.* |
| FilterIndex | INTEGER 1st index is 0 | RW | 1 |
| InitialDir | STRING | RW | |
| Mode | INTEGER sets whether the dialog box
will be an Open dialog or Save. Valid arguments: fdOpen = 0 fdSave = 1 |
RW | fdOpen |
| MultiSelect | INTEGER If set to true and Mode = fdOpen, then the user can select up to 256 files | RW | False |
| NoChangeDir | INTEGER If set to true the QFileDialog will not change the current directory | RW | False |
| Parent | LONG This is the parent form handle, can be null | RW | Null |
| SelCount | INTEGER Number of files the user selected when Multiselect = true |
R | 0 |
| WarnIfOverWrite | INTEGER Flag for warning if you want to overwrite the file when mode is fdSave |
RW | True |
| Method | Type | Description | Params |
| Execute | FUNCTION | Returns TRUE (user picked files) or FALSE (user picked Cancel) | 0 |
$INCLUDE "RapidQ2.inc"
DIM i as integer
DIM fDialog as qfiledialog
fDialog.Caption = "QfileDialog test"
fDialog.FileName= "test.txt"
fDialog.InitialDir = "C:\RapidQ"
fDialog.MultiSelect = 1
IF fDialog.Execute THEN
IF fDialog.MultiSelect THEN
for i = 0 to fDialog.SelCount
ShowMessage fDialog.Files(i) 'item #0 is the directory
next i
ELSE
ShowMessage "file name & path =" + fDialog.FileName
ShowMessage "file name no path =" + fDialog.FileTitle
END IF
END IF
| Prev Component | Contents | Next Component |