Inserting line break and paragraph break

General TRichView support forum. Please post your questions here
Post Reply
ilyalyu
Posts: 2
Joined: Sun Oct 17, 2010 8:46 am

Inserting line break and paragraph break

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

uses RVUni;

InsertTextW(WideChar(UNI_LineSeparator));
mboth
Posts: 26
Joined: Thu Nov 26, 2009 10:48 am
Location: Hannover, Germany.

Post 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
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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
mboth
Posts: 26
Joined: Thu Nov 26, 2009 10:48 am
Location: Hannover, Germany.

Post 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.
Post Reply