Board index » delphi » Append extra string into memo last line...

Append extra string into memo last line...

let's say i juz add a line to a memo.
        memo1.lines.add('abc');

now, i wanna append to the previous line to become 'abc efh aaa'.
how to do so?

 

Re:Append extra string into memo last line...


Memo1.Lines[Memo1.Count-1] := Memo1.Lines[Memo1.Count-1] + ' efh aaa';

--

Woody

Quote
Siang Chuen <scp...@tm.net.my> wrote in message

news:388AE918.AD79F5C4@tm.net.my...
Quote
> let's say i juz add a line to a memo.
> memo1.lines.add('abc');

> now, i wanna append to the previous line to become 'abc efh aaa'.
> how to do so?

Re:Append extra string into memo last line...


Memo1.Lines[Memo1.Lines.Count -1] := Memo1.Lines[Memo1.Lines.Count -1] +
'efh aaa';

Memo1.Lines.Count - 1 gives the index of the last line in the memo.

--
Bill

Bill Todd (TeamB)
(TeamB cannot respond to questions received via email)

Other Threads