RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomFileDialog.Files Property

List of selected file names.

Pascal
property Files: TStrings;
C++
__property TStrings Files;

Files is a string list that contains each selected file name with its full directory path. (To let users select multiple file names, set the fdoAllowMultiSelect flag in Options.) Use properties and methods for string lists to traverse this list of files and read individual items. 

The example below assigns the list of files in Files to the Items property of a TListBox component.

ListBox1.Items.Assign(OpenDialog1.Files);

 

ListBox1->Items->Assign(OpenDialog1->Files);

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!