Add specific online text with repetition

0

In the image below we have the following case the person types in the two edit fields. And you click Generate Recommendation values are written in a Tmemo.  The second step would be to enter a new information in the edits and when clicking the button ok the same must be added below the previous one and above the line return dose . I can only insert or below all the text or if I define the line that Tmemo will write, it overwrites when there is something on that line

    
asked by anonymous 25.09.2015 / 21:42

1 answer

2

The Tmemo has the LINES property that can be accessed directly.

See for example:

var i : integer;
begin

  i := memo1.Lines.IndexOf('o texto antes escrito');
  Memo1.Lines.Delete[i];
  Memo1.Lines.Insert(i,'insere o novo texto');
end;

Notice that the list starts at index 0 (zero)

    
27.09.2015 / 23:57