W
W
White_Bambie2019-01-19 08:59:21
Delphi
White_Bambie, 2019-01-19 08:59:21

How to implement content copying from Memo1 to Memo2?

There are two Memos on the form. You need to copy the content from memo1 to memo2, starting at the specified line. The specified string is written to edit. I understand that this function can be implemented through a loop. But in delphi I'm weak, so I turn to you for help. If it is not difficult for someone, I will be glad to provide коду.
All the best!
Example:5c42bc2d7c597226535577.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tsvetkov, 2019-01-19
@White_Bambie

And how to copy the content from memo1 to memo2 with this condition?
var i: integer;
begin
  Memo2.Clear;
  for i := Memo1.Lines.IndexOf( Edit1.Text ) to ( Memo1.Lines.Count - 1 )
    do Memo2.Lines.Add( Memo1.Lines[i] );
end;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question