Registriert seit: 30. Mär 2003
Ort: Freital
694 Beiträge
|
Re: Ordnerinhalt in eine Listbox
19. Aug 2003, 23:59
Meinst du das so:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
s, path: string;
i : integer;
stl : tstringlist;
begin
path:='c:\Test\*.*'#0;
s := path;
ListBox1.Perform(LB_DIR, DDL_READWRITE, LongInt(@s[1]));
listbox1.ItemIndex:=0;
stl:=tstringlist.Create;
try
for i := 0 to listbox1.items.count - 1 do
begin
stl.Add(listbox1.items.strings[listbox1.itemindex]);
listbox1.ItemIndex:=listbox1.ItemIndex+1;
end;
listbox1.Items.CommaText:=stl.commatext;
finally
stl.Free;
end;
end;
I wish it was legal to marry software because I'm madly in love with Delphi...
|