Autor Beitrag
Florian.K
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130

Win Xp Prof. & SP 2
Delphi 10 Lite
BeitragVerfasst: Di 08.05.07 18:44 
Hi !
Kann ich die Strings mehrerer Editfelder in eine txt Datei speichern?

ausblenden Delphi-Quelltext
1:
2:
3:
SaveStringToFile('Filename.txt', edt1.Text);
SaveStringToFile('Filename.txt', edt2.Text);
...


Bei mir ersetzt er den vorherigen String

Danke im Voraus
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Di 08.05.07 18:55 
Es geht auf jeden Fall, jedoch nicht mit der Prozedur, die du da verwendest.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Florian.K Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130

Win Xp Prof. & SP 2
Delphi 10 Lite
BeitragVerfasst: Di 08.05.07 18:57 
Okay, Trick 17 muss her

das bedeutet 61 Textdateien :)

mfG
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Di 08.05.07 18:59 
Erstell eine TStringList.

In die kannst du dann deine Strings aus den Edits hinzufügen mit:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
var k : TStringList;
begin
 k:=TStringList.Create;
 k.add(edit1.text);
 k.add(edit2.text);
 ...
 k.saveToFile('c:\Dateiname.txt');
end;
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Di 08.05.07 19:00 
Laden geht dann mit LoadFromFile und dann kannste über die Eigenschaft .Strings[i] auf die Felder zugreifen.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.