Programmatically insert a line break (shift-enter)

General TRichView support forum. Please post your questions here
Post Reply
aaangeli
Posts: 3
Joined: Mon Sep 22, 2014 3:57 pm

Programmatically insert a line break (shift-enter)

Post by aaangeli »

Hi, which is the best way to insert a line break (a shift-enter) command programmatically? I could not find an equivalent action or nethod in TRichView components.

Thank you
Davide
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If you need insert a line break in the caret position as an editing operation, you can call

rve.InsertTextW(WideChar($2028)) - for all versions of Delphi
rve.InsertText(WideChar($2028)) - for Delphi 2009 and newer.

TRichViewEdit process this character as line break.
$2029 and combinations of CR LF characters are processed as paragraph breaks.
Post Reply