| Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back |
Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
PromptForFileName |
unit |
| Dialogs | |
| category | |
| Dialog and Message routines |
| declaration |
| description |
The AFilename value supplied by the call is used to initialize the file name in the dialog. On exit, AFileName contains the name specified in the dialog.
AFilter determines the file masks (filters) available in the dialog. If set to an empty string, the dialog uses the string 'All files (*.*)|*.*', which causes the dialog to display all files in the current directory.
ADefaultExt specifies a file extension that is appended automatically to the specified file name.
ATitle specifies the title for the dialog. If ATitle is set to an empty string, the dialog uses Open or Save As, depending on the value of the SaveDialog parameter.
AInitialDir specifies the directory displayed in the dialog when it opens.
SaveDialog specifies whether the file selection should be a Save As dialog (true) or an Open dialog (false).
| example |
var
AFileName: string
//displays the save as dialog for an application defined data with extension MAF...
if PromptForFileName(AFileName, 'My App files(*.maf)|*.maf', '',
'Save the data as...'; ExtractFileDir(Application.ExeName),
True) then
...
|
| in real code |
Various Delphi Programming technical articles.
| see also |
| Free Delphi code snippet inside every Delphi Newsletter! |
|
|
| Got some code to share? Got a question? Need some help? |
|
|
