Re: Re: Re: Displaying text in a TRichEdit?
Posted by webmaster Guido on February 23, 2001 at 15:01:54: In Reply to: Re: Re: Displaying text in a TRichEdit? posted by Jeff on February 22, 2001 at 16:33:41:
: I figured out how to do it a little different. What do you think about this? ------------- That certainly will work, but the result is not always the same. With SelText :=... you replace the selected text with a new text, and if nothing is selected, it inserts text at the position of the cursor. So, your code only gives the desired results under certain starting conditions:
- the cursor must be at the end of the RichEdit; If you are not always 100% sure of the starting conditions, you could start the code with these two steps:
1. If the RichEdit is not empty and there is no CR/LF at the end, add a CR/LF (add an empty line);
|
|