Answer the question
In order to leave comments, you need to log in
How to insert text in RichEdit2 after a specified word in RichEdit1?
Good day! Can you please tell me how to add lines in RichEdit2 from RichEdit1 after a certain word in RichEdit1.
For
example: RichEdit1 contains the following lines:
First row:
1
2
3
4
5
Second row:
1
2
1
2
Answer the question
In order to leave comments, you need to log in
var
I, Index: Integer;
begin
Index := RichEdit1.Lines.IndexOf('Второй ряд:');
for I := Index + 1 to RichEdit1.Lines.Count - 1 do
RichEdit2.Lines.Add(RichEdit1.Lines[I]);
end;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question