Autor Beitrag
sonic159
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 76

Windows XP
BDS 2006 Professional
BeitragVerfasst: Mi 21.02.07 17:15 
Hallo!

Wie kann ich alle Dateien aus einem Ordner in eine ListBox bekommen...?

Danke!
MfG: $on!c
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 21.02.07 17:19 
Moin!

Such mal nach den Suche in: Delphi-Forum, Delphi-Library DRIVETOOLS von user profile iconLuckie, damit solltest du weiter kommen. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
sonic159 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 76

Windows XP
BDS 2006 Professional
BeitragVerfasst: Mi 21.02.07 17:33 
Hey vielen Dank!
Habs gefunden...

MfG: $on!c
raven_22
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 95

Win XP pro
D7 Enterprise
BeitragVerfasst: Di 20.03.07 23:46 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
function DIR (Path:String):Tstringlist;
var tr:TsearchRec;
begin
result := Tstringlist.Create;
FindFirst(Path,faAnyFile,tr);
    while FindNext(tr)=0 do
        begin
        if (tr.Attr and faDirectory > 0then
         result.Add('<DIR> '+tr.Name);
                 if (tr.Attr and faDirectory = 0then
         result.Add(tr.Name);
        end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
listbox1.Items:=DIR('c:\*.*');
end;


LG raven

_________________
---_-= raven_22 =-_---
Calculon
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Mi 21.03.07 12:29 
Die Filelistbox-Komponente scheint irgendwie nie nennenswert zu sein :gruebel: ; das kapier' ich nicht, weil sie eigentlich genau das tut

Zitat:
alle Dateien aus einem Ordner in eine ListBox


Gruß

Calculon
--