Groups | Blog | Home
all groups > visual c > january 2004 >

visual c : newline format control in richtextbox


D Steward
1/29/2004 10:31:06 PM
I can't seem to add a newline (/n) to get a richtextbox control to display text on successive lines. The text that I type is overwritten. How do I remedy this

My example

richTextBox->Multiline = true
richTextBox->Text = S"First line /n"
richTextBox->Text = S"Second line"

Thanks

D Steward
1/30/2004 11:26:08 AM
I have tried numerous combinations of escape sequences, and none of them work

It appears what happens is that it doesn't recognize the escape sequence and just overwrites the previous line

Any suggestions would be appreciated

D Steward
1/30/2004 12:16:06 PM
I tried this to no avail. Could you give me an example of how I could modify my originally posted code

Thanks

DA

----- Austin Ehlers wrote: ----

Also use the += operator. Otherwise you're just overwriting th
previous string

Austi

On Fri, 30 Jan 2004 12:43:37 -0000, "Steve McLellan
[quoted text, click to view]
harry_bosch
1/30/2004 12:43:25 PM
[quoted text, click to view]

You're not using an escape sequence, that's why :-)

"/n" vs. "\n"


--
Steve McLellan
1/30/2004 12:43:37 PM
Hi,

Try using \r\n - sounds like you're just getting a carriage return, and not
a newline.

Steve

[quoted text, click to view]
text on successive lines. The text that I type is overwritten. How do I
remedy this?
[quoted text, click to view]

Austin Ehlers
1/30/2004 1:47:40 PM
Also use the += operator. Otherwise you're just overwriting the
previous string.

Austin

On Fri, 30 Jan 2004 12:43:37 -0000, "Steve McLellan"
[quoted text, click to view]
AddThis Social Bookmark Button