Hi !
I have a form. The form has a textbox and a richtextbox.
There is a button also. When the button is clicked,
whatever text was typed into the text box, must be copied
to the richtextbox.

At runtime, I enter the following string into the text
box:
Hi\nHello\nHow\nDo\nYou\nDo

Then I click the button. In the richtextbox I am expecting
Hi
Hello
How
Do
You
Do

But what I get is:
Hi\nHello\nHow\nDo\nYou\nDo


Ne idea to workaround this probs?

...Sinex

Re: Escape characters in RichTextBox.... by Michael

Michael
Thu Sep 25 10:06:41 CDT 2003

When entered through the keyboard as text into the control, they are not
escape characters -- they are just regular characters. So what you see is
expected. Are you looking to create code that will treat text as something
to parse and thus will treat the backslash as a character escaping function
generically?


--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.


"Sinex" <manoj.narinder@honeywell.com> wrote in message
news:1049001c3835d$fee20b90$a601280a@phx.gbl...
> Hi !
> I have a form. The form has a textbox and a richtextbox.
> There is a button also. When the button is clicked,
> whatever text was typed into the text box, must be copied
> to the richtextbox.
>
> At runtime, I enter the following string into the text
> box:
> Hi\nHello\nHow\nDo\nYou\nDo
>
> Then I click the button. In the richtextbox I am expecting
> Hi
> Hello
> How
> Do
> You
> Do
>
> But what I get is:
> Hi\nHello\nHow\nDo\nYou\nDo
>
>
> Ne idea to workaround this probs?
>
> ...Sinex



Escape characters in RichTextBox.... by T

T
Tue Sep 30 18:05:18 CDT 2003


>-----Original Message-----
>Hi !
>I have a form. The form has a textbox and a richtextbox.
>There is a button also. When the button is clicked,
>whatever text was typed into the text box, must be copied
>to the richtextbox.
>
>At runtime, I enter the following string into the text
>box:
>Hi\nHello\nHow\nDo\nYou\nDo
>
>Then I click the button. In the richtextbox I am
expecting
>Hi
>Hello
>How
>Do
>You
>Do
>
>But what I get is:
>Hi\nHello\nHow\nDo\nYou\nDo
>
>
>Ne idea to workaround this probs?
>
>....Sinex
>.
>
use

String s1=Regex.Unescape(textBox1.Text);

and put s1 in your RichTextBox