Carriage Return and Line Feed

SyntaxEditor for Windows Forms Forum

Posted 16 years ago by Steve Millar
Avatar
It appears when I get the Text property from the Document the resulting text strips the carriage returns if they exist. Is this behavior overridable?

Example code:

txtRaw.Document.Text = "\r\n";
string blah = txtRaw.Text;

The value of blah is "\n"

Comments (1)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
No when parsing we want to optimize things and therefore looking at a single \n instead of a \n or \r\n is best. However you can get the \r\n version of text by using the Document.GetText method.


Actipro Software Support

The latest build of this product (v21.1.0) was released 16 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.