Autor Beitrag
DelphiDelphin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 18.04.05 19:27 
wie kann ich machen das det text von edit 1 und 2 in eine .txt datei gespeichert wird ???


Moderiert von user profile iconraziel: Topic aus Sonstiges verschoben am Mo 18.04.2005 um 22:42
Tobias1
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 454

Win 98, XP Prof
D3 Prof, D2005 Prof
BeitragVerfasst: Mo 18.04.05 19:29 
In die selbe oder in zwei verschiedene?

_________________
Auch das schlechteste Buch hat seine gute Seite: die letzte. (John Osborne)
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 18.04.05 19:31 
is egal das einfachere von beidem
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mo 18.04.05 19:33 
Einfach mit Hilfe einer Suche in: Delphi-Forum, Delphi-Library STRINGLIST speichern.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Codewalker
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46



BeitragVerfasst: Mo 18.04.05 19:34 
Ich gehe mal davon aus, dass Du beides in eine Datei speichern willst. Dann ist das einfachste mit einer TStringList zu arbeiten.

Zum Speichern schreibst du folgendes:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
Var List: TStringList;
begin
 List:=TStringList.Create;
 List.Add(Edit1.Text);
 List.Add(Edit2.Text);
 List.SaveToFile(xxx.yyy);
 List.Free;
end;


Und zum Laden:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
Var List: TStringList;
begin
 List:=TStringList.Create;
 List.LoadFromFile(xxx.yyy);
 Edit1.Text:=List[0];
 Edit2.Text:=List[1];
 List.Free;
end;


Das kann man zwar noch schöner machen, mit Fehlerbehandlung und so, aber für den Anfang reichts glaube ich.