Link to home
Start Free TrialLog in
Avatar of mmilan
mmilan

asked on

About OpenDialog

How can I find out how many files are selected when I use OpenDialog for opening files?
ASKER CERTIFIED SOLUTION
Avatar of williams2
williams2

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of inthe
inthe

hi here is another way
procedure TForm1.Button1Click(Sender: TObject);
var
a:integer;
begin
opendialog1.Execute;
a:=opendialog1.Files.Count;
showmessage(inttostr(a));
end;

Regards Barry
Williams your too fast  :-)
Hi Barry, you gotta be fast at this site. The last 5 times I wrote answers, somebody came up before me :-) ..but I guess this will clear up things:

That's actually easy enough:

This will also do:

procedure TForm1.Button1Click(Sender: TObject);
begin
  Memo1.Clear;
  If OpenDialog1.Execute then
    memo1.Lines.AddStrings(OpenDialog1.Files);
end;