Autor Beitrag
JaketheSnake
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 149

XP
D5 Prof.
BeitragVerfasst: Sa 17.09.05 14:06 
Hallo Delphiforum

Ich hab da so en problemchen.

Ich will ein Text (mehrere Seiten) in ein Textfeld kopieren , dann auf einen Button drücken
und alle Wörter sollen einzeln in dem gleichen oder in einem anderen Textfeld untereinander stehen.

Ich kein Plan wie ich das hinkriegen soll, bin leider noch so was wie ein Anfänger in Delphi aber vielleicht könnt ihr mir helfen .

_________________
Good, better , best
Amateur
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 777

(Win98, WinMe) WinXP Prof
D3 Prof, D6 Pers, D2k5 Pers., Turbo C++ Explorer
BeitragVerfasst: Sa 17.09.05 14:16 
also ich würde das textfeld nach leerzeichen untersuchen lassen und imemr wenn eins auftaucht ein absatz machen lassen. der sollte mit #13 gemacht werden, viell gibts da aber auch ne andere methode die das einfacher macht...

hoffe geholfen zu haben

_________________
"Kein dummes Gerede. Kein Rumrätseln. Denkt an nichts anderes mehr, nur noch an das, was vor euch liegt. Das ist die wahre Herausforderung. Ihr müßt euch vor euch selbst schützen, Leute." (Rennes in "Cube")
Beiträge: >700
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Sa 17.09.05 14:55 
ausblenden Delphi-Quelltext
1:
Memo1.text := Stringreplace(memo1.text, ' ',#13,[rfreplaceall]);					

Code ungetestet sollte aber funzen
JaketheSnake Threadstarter
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 149

XP
D5 Prof.
BeitragVerfasst: Sa 17.09.05 15:08 
Funktioniert nicht ganz.
Es werden nur die Leerzeichen durch ein | ersetzt.
Die Wörter stehen weiterhin in einer Zeile.

_________________
Good, better , best
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Sa 17.09.05 15:16 
Nim ein Richeditfeld statt nem Memo, dann geht's.
JaketheSnake Threadstarter
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 149

XP
D5 Prof.
BeitragVerfasst: Sa 17.09.05 15:18 
schon ma danke ich probiers ma aus :D

_________________
Good, better , best
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: Sa 17.09.05 15:21 
Das Trennzeichen in einem Memofeld ist aber #13#10, und nicht nur #13.
#13 = Zum Anfang der Zeile, #10 = Eine Zeile vor (Stammt aus alten Fernschreiberzeiten)
also lautet die korrekte StringReplace Anweisung
ausblenden Delphi-Quelltext
1:
Memo1.text := Stringreplace(memo1.text, ' ',#13#10,[rfreplaceall]);