Add specific inline text with repetition

Asked

Viewed 269 times

0

In the image below we have the following case the person types in the two fields of Edit. And click Generate recommendation values are written in a Tmemo. The second step would be to type a new information in the edits and when clicking the button ok the same should be added below the previous and above the line return dose. I can only insert or below the whole text or if I define the line that the Tmemo will write, it overwrites when there’s something on that line

inserir a descrição da imagem aqui

1 answer

2


The Tmemo owns the property LINES which can be accessed directly.

Take 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;

note that the list starts at index 0 (zero)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.