Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 12-02-2006, 09:28 PM
kate kate is offline
Senior Member
 
Join Date: Feb 2001
Posts: 356
Default OpenDialog MultiSelect

Hi,
I have set the OpenDialog options of ofAllowMultiSelect to TRUE. I can now select several files at one time by holding the keyboard CTRL key down and click.

How do I parse all the selected files to a TMemo, since I find that when I read OpenDialog.FileName, there seems to be only one file though I have selected multi files.

Thank you.
Reply With Quote
  #2  
Old 12-02-2006, 10:25 PM
digitiger digitiger is offline
Senior Member
 
Join Date: Jan 2001
Posts: 716
Default RE: OpenDialog MultiSelect

This dialog has another property named "Files" which holds all the file names selected. It can be done as follows:


var
i : Integer;
begin
if OpenDialog1.Execute then
for i := 0 to OpenDialog1.Files.Count -1 do
Memo1.Lines.Add(OpenDialog1.Files.Strings[i])
end;

Hope it helps and if it does then accept the answere
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 12:32 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.