Page 1 of 1
Programmatically insert a line break (shift-enter)
Posted: Mon Sep 22, 2014 4:02 pm
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
Posted: Fri Sep 26, 2014 8:05 am
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.