Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2004

Tip: Looking for answers? Try searching our database.

newline format control in richtextbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
D Steward - 30 Jan 2004 06:31 GMT
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

DAS
Steve McLellan - 30 Jan 2004 12:43 GMT
Hi,

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

Steve

> 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:
>
[quoted text clipped - 5 lines]
>
> DAS
D Steward - 30 Jan 2004 19:26 GMT
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

DAS
harry_bosch - 30 Jan 2004 20:43 GMT
=?Utf-8?B?RCBTdGV3YXJk?= <anonymous@discussions.microsoft.com> wrote:

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

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

"/n" vs. "\n"

Signature

harry

Austin Ehlers - 30 Jan 2004 19:47 GMT
Also use the += operator.  Otherwise you're just overwriting the
previous string.

Austin

>Hi,
>
[quoted text clipped - 16 lines]
>>
>> DAS
D Steward - 30 Jan 2004 20:16 GMT
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
    <sjm@fixerlabs.com.NOSPAM> wrote
   
    >Hi
    >>Try using \r\n - sounds like you're just getting a carriage return, and no
    >a newline
    >>Stev
    >>"D Steward" <anonymous@discussions.microsoft.com> wrote in messag
    >news:A8A5D18E-AE0D-4001-94A4-EF26C32777BB@microsoft.com..
    >> I can't seem to add a newline (/n) to get a richtextbox control to displa
    >text on successive lines. The text that I type is overwritten. How do
    >remedy this
    >>>> My example
    >>>> richTextBox->Multiline = true
    >> richTextBox->Text = S"First line /n"
    >> richTextBox->Text = S"Second line"
    >>>> Thanks
    >>>> DA

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.