Autor Beitrag
oOpadeisOo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21



BeitragVerfasst: Mi 28.10.09 17:42 
Hi @ all,

ich wollte euch mal fragen wie ich eine bestimmte Zeile aus einem Memofeld auslesen kann?

thx schonmal


Moderiert von user profile iconNarses: Topic aus Programmierwerkzeuge verschoben am Mi 28.10.2009 um 17:57
Xentar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2077
Erhaltene Danke: 2

Win XP
Delphi 5 Ent., Delphi 2007 Prof
BeitragVerfasst: Mi 28.10.09 17:46 
ausblenden Delphi-Quelltext
1:
Memo1.Lines[1]					

Vorsicht: Das fängt bei 0 an zu zählen. Die letzte Zeile ist also Memo1.Lines[Memo1.Count-1]

_________________
PROGRAMMER: A device for converting coffee into software.
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Mi 28.10.09 17:46 
zb:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.foo();
var s: String;
begin
s := memo.lines[5];
Showmessage(s)
end;


achtung, der index beginnt bei 0. ;)

lg elundril

//edit: schnapp mit nicht das topic weg :motz:

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.