Autor Beitrag
simbabque
Hält's aus hier
Beiträge: 6



BeitragVerfasst: Sa 08.02.03 18:37 
Moin,
ich will die Eintraege einer ComboBox Zeile fuer Zeile aus einer Datei lesen, so das jede Zeile ein neues Item ist. Ich habe nur keine Idee wie genau ich das machen soll... Die Delphi Hilfe sagt leider nicht genug im sich da was zusammen zureimen... :(

Danke.

_________________
Stop TCPA - Denn es sind Deine Rechte!!!
DaRkFiRe
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 526

WinXP Home & Professional
C, C++, Delphi
BeitragVerfasst: Sa 08.02.03 19:01 
sTextFile sei mal der Dateiname der Textdatei...

Entweder

ausblenden Quelltext
1:
Combobox1.Items.LoadFromFile(sTextFile);					


oder

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
var F:TEXTFILE;
var S:STRING;
begin
  assignfile(f,sTextFile);
  try
    reset(F);
    while not eof(F) do
      begin
        readln(F,S);
        Combobox1.Items.Add(S);
      end;
  finally
    closefile(F);
  end;
end;

_________________
Lang ist der Weg durch Lehren - kurz und wirksam durch Beispiele! Seneca
simbabque Threadstarter
Hält's aus hier
Beiträge: 6



BeitragVerfasst: Sa 08.02.03 19:12 
Danke :)

_________________
Stop TCPA - Denn es sind Deine Rechte!!!
DaRkFiRe
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 526

WinXP Home & Professional
C, C++, Delphi
BeitragVerfasst: Sa 08.02.03 20:23 
Keine Ursache - für sowas sind Foren ja da :)

_________________
Lang ist der Weg durch Lehren - kurz und wirksam durch Beispiele! Seneca