Einzelnen Beitrag anzeigen

Benutzerbild von DGL-luke
DGL-luke

Registriert seit: 1. Apr 2005
Ort: Bad Tölz
4.149 Beiträge
 
Delphi 2006 Professional
 
#6

Re: Werte in Textdatei speichern und als Liste in Popup ausg

  Alt 9. Mai 2006, 13:40
Delphi-Referenz durchsuchenTStringList



Einfaches Beispiel:

Delphi-Quellcode:
var st: TStringList;
    s: string;
begin
  st := TStringList.Create;
  try
    st.LoadFromfile('text.txt');
    for s in st do //ab BDS 2005, ansonsten mit Iterationsvariable: for i := 0 to st.Count -1 do
      showmessage(s); //ab BDS 2005; ansonsten showmessage(st.strings[i]);
  finally
  end;
end;
Lukas Erlacher
Suche Grafiktablett. Spenden/Gebrauchtangebote willkommen.
Gotteskrieger gesucht!
For it is the chief characteristic of the religion of science that it works. - Isaac Asimov, Foundation I, Buch 1
  Mit Zitat antworten Zitat