The function Memo.Lines.Add('Some text')
in Delphi adds the string to the bottom of the memo. Is there any function which adds the text to the top?
For example, if the Lines
property of the Memo contains:
string 1
string 2
string 3
I want to add a string string 0
before string 1
. How can I do that?
The Lines
property is a TStrings
instance that supports inserting at a specified line number. The method to do so is Insert
and is called like this:
Memo.Lines.Insert(0, 'string 0');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With