get non-printing char in TextBoxExt instead of Return

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?

2 Replies

AD Administrator Syncfusion Team 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.


BT Byron Tate July 19, 2005 10:35 PM UTC

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

Loader.
Up arrow icon