0

I just would like some help when adding contents between two lines... If I have this on Memo:

//--------------------------------------------------
//---------- Mauro Mascarenhas de Araújo -----------
//--------------------------------------------------

I would like add a line before the last line (on this case, because I need this function to do it in a bigger way than on this example), something like that:

//--------------------------------------------------
//---------- Mauro Mascarenhas de Araújo -----------
//------------ C++ Programer aprentice -------------
//--------------------------------------------------

I've tried to find some integrated function that could do that, but I haven't found. If you can help me with that, I would be very happy.

Are there any ready function or should I create two TStrings components, copy the memo content since the begining, untill the line '1' (on this case - so, the line I wanted), and use the other to copy the since the line '3' (on this case - so, the line after I wanted untill the end) Rewrite the memo with the first component add the lines I want, and after add the lines of the second component. - I know it is confusing, that's why I'm tryng to find a ready function.

Since now, THANKS A LOT.

mauroaraujo
  • 332
  • 1
  • 10
  • 23
  • For future reference, you can post answers to your own questions. You don't need to edit the question to state the answer. – Remy Lebeau Mar 08 '15 at 02:18

1 Answers1

0

I found a how to:

Form1->Memo1->Lines->Insert(int line, String StringIWant);

Thanks for everybody who at least though in answering me XD.

mauroaraujo
  • 332
  • 1
  • 10
  • 23