We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

get non-printing char in TextBoxExt instead of Return

Thread ID:





32005 Jul 19,2005 08:55 PM UTC Jul 19,2005 10:35 PM UTC WinForms 2
Tags: Tools
Byron Tate
Asked On July 19, 2005 08:55 PM UTC

I have a text string: "Hi\nThere\r\nHow\n\rAre you" In TextBoxExt the ''\n'' appears as a non-printing char, the ''\r\n'' appears correctly as a Return, and ''\n\r'' appears as two non-printing chars. If I am typing in a text editor, including Syncfusion Forms.Edit.EditControl, and press the ''Return'' key, I get only the ''\n'' character in the string. How can I get TextBoxExt to handle a ''\n'' char correctly?

Administrator [Syncfusion]
Replied On July 19, 2005 09:55 PM UTC

Hi Byron, TextBoxExt is derived from TextBox. If you try the same strings in a TextBox you''ll notice that the same thing happens. This is because Microsoft''s standard for a new line is \r\n, rather than the more general standard of \n. To get TextBox to correctly display \n, you''ll need to do a .Replace("\n","\r\n") on your string before assigning it to the TextBox. Regards, Gregory Austin Syncfusion Inc.

Byron Tate
Replied On July 19, 2005 10:35 PM UTC

yea, OK . I did that, so I''ll keep that code in. Thanks.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon