Page 1 of 1

Inserting line break and paragraph break

Posted: Sun Oct 17, 2010 9:15 am
by ilyalyu
Are there method for inserting line breaks (equivalent to Shift-Enter key) and paragraph breaks (equivalent to Enter key)? InsertText(#13#10) seems to insert paragraph break. However, I can't find a way to insert simple line break.

Posted: Sun Oct 17, 2010 4:14 pm
by Sergey Tkachenko
uses RVUni;

InsertTextW(WideChar(UNI_LineSeparator));

Posted: Wed Feb 06, 2013 5:12 pm
by mboth
Sorry to wakeup this old thread, but my question fits here very well:
Sergey Tkachenko wrote:uses RVUni;

InsertTextW(WideChar(UNI_LineSeparator));
When I SaveRTF(), this appears in the RTF as "\u8232 ?" and Word2003 does not recognize it. It should be "\line ", right?

Is there a way to get this right?

Thank you,
Moritz

Posted: Tue Feb 12, 2013 2:04 pm
by Sergey Tkachenko
I cannot reproduce this problem. In my tests, this character, as expected, is not inserted in a text item, but it makes a line break. So it is saved in RTF as \line

Posted: Mon Feb 18, 2013 1:47 pm
by mboth
The fault was on my side, I hadn't realized that this specific text was set by the SetItemText method which by definition does not handle any breaks.

My apologies and thank you for your time.