Autor Beitrag
kinghavi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37



BeitragVerfasst: Mi 07.03.07 13:53 
hei ho.

Ich hab zum Auslesen von vorhandenen Daten das Drive tool von hier benutzt hab dabei aber ein Problem ich lade die Daten in eine Listbox:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
begin
  InitFindAllFiles;
  FindAllFiles(extractFilePath(application.ExeName)+'\datenbanken\', '*.mdb' ,false);

  begin
  for i := 0 to 2 do
  form6.listbox1.items.add(foundfiles[i]);
  end;
end;


Das Problem ist, das ich so nur die ersten drei Auslesen kann. Ich kann jetzt zwar die zweite Zahl in der For Schleife erhöhen aber das darf ich nicht falles weniger als diese Zahl Datein da sind. kann man das irgenwie zählen oder flexibler gestalten?

mfg

Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 07.03.07 13:57 
Wenn FoundFiles eine Stringlist ist, dann kann man die Anzahl mit FoundFiles.Count bestimmen. Die Schleife muss dann natürlich von 0 bis FoundFiles.Count - 1 gehen.

_________________
We are, we were and will not be.