Hi,
The workaround of
rte_1.selecttextall ()
rte_1.copy()
mle_sql.Text = Clipboard()
is okay, if you don't care about RTE formatting. If your formatting of bold, colors, etc. is not important then you might as well directly use a mle instead of a richtext edit to start with ...
Maybe it's not of much help, but I've discovered that there's some kind of relation between the amount of returns before your text and after your text:
If you have the same amount of enters after the text +1, as the amount of enters/returns you have before the text, at least the text itself is not being truncated. You will still have enters before and after being stripped of but you might be able to work around that.
So my suggestion is to do something like:
1) try to delete all first enters and last enters around your text. Maybe that can be done with SelectText() and then replace that. Assumed of course that the replace on a single selected enter would work ..
or if that doesn't work out ...
2) try to trail your text with as much enters you have at the beginning + 1. So if you have 2 enters at the start of your complete text, then make sure you have 3 enters after the last character of your text. You would have to position your insertion point / cursor at the end of the text and then paste in some enters.
If I have some time, I'll try to do this myself but to be honest, I'm quite busy these days.
HIH.