Autor Beitrag
xxlolxx
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 48

win xp home
Delphi 7 personal
BeitragVerfasst: Mi 03.01.07 18:02 
hallo hab vor kurzem erst mit delphi angefangen und hab ne frage:

wie kann man den text aus einen editfeld speichern???


Zuletzt bearbeitet von xxlolxx am Mi 03.01.07 22:37, insgesamt 1-mal bearbeitet
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: Mi 03.01.07 18:04 
wie lange denn, nur so lange bis das Programm geschlossen wird oder in eine Textdatei;

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
xxlolxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 48

win xp home
Delphi 7 personal
BeitragVerfasst: Mi 03.01.07 18:07 
in einer textdatei
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: Mi 03.01.07 18:11 
so in etwa müsste es gehen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
var strings: TStringlist;
begin
  strings := TStringlist.Create();//erzeugt Stringlist
  strings.Add(edit1.Text);//fügt ihr den wert von edit1.text zu
  strings.SaveToFile('C:\text.txt');// speicht die stringlist auf C:\
end;


Edit:QT korrigiert :oops:

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.


Zuletzt bearbeitet von Leuchtturm am Mi 03.01.07 18:16, insgesamt 1-mal bearbeitet
xxlolxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 48

win xp home
Delphi 7 personal
BeitragVerfasst: Mi 03.01.07 18:14 
danke es funktioniert
Leuchtturm
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1087

Win Vista, Knoppix, Ubuntu
Delphi 7 Pe, Turbo Delphi, C#(VS 2005 Express), (X)HTML + CSS, bald Assembler
BeitragVerfasst: Mi 03.01.07 18:15 
Du musst natürlich string.savetoFile('C.\text.txt'); schreiben :oops:

_________________
Ich bin dafür verantwortlich was ich sage - nicht dafür was du verstehst.
xxlolxx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 48

win xp home
Delphi 7 personal
BeitragVerfasst: Mi 03.01.07 18:45 
Titel: text aus textdatei wieder in ein editfeld bekommen
wie bekomme ich den text aus einer textdatei wieder ins ein editfeld????
Miri
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 657


Delphi 3 Prof., Delphi 2005 PE
BeitragVerfasst: Do 04.01.07 08:21 
Hi...

an sich gilt hier im Forum die Regel "Nur eine Frage pro Thread".
Aber da dir user profile iconLeuchtturm schon mal die Funktion savetofile() genannt hat, geb ich dir mal den Tipp, dich mit der Suchfunktion hier im Forum oder mit der Delphi-Hilfe und der Funktion loadfromfile() zu beschäftigen!

Gruß,
Miri

_________________
Anonymes Eckenkind
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 04.01.07 09:54 
Er hat für die Frage bereits einen eigenen Thread eröffnet und dort Antwort bekommen...

// EDIT:
Für alle späteren Leser dieses Threads:
Hier: www.delphi-forum.de/viewtopic.php?t=68272