(CodeLib-Manager)
Registriert seit: 10. Jun 2002
4.648 Beiträge
Delphi XE Professional
|
Re: opendialog, allowmultiselect, filename
18. Apr 2004, 19:31
Hi,
So:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
i: Word;
begin
if OpenDialog1.Execute then
begin
for i := 0 to OpenDialog1.Files.Count -1 do
ListBox1.Items.Add(OpenDialog1.Files[i])
end;
end;
oder so (verstreamte Version):
Delphi-Quellcode:
var
s: TStream;
begin
if OpenDialog1.Execute then
begin
s := TMemoryStream.Create;
try
OpenDialog1.Files.SaveToStream(s);
s.Position := 0;
ListBox1.Items.LoadFromStream(s);
finally
s.Free;
end;
end;
Thomas
|