🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6348

Re: AnsiString and the LineFeed char

#6348
From: Jonathan Benedicto
Date: Tue, 17 May 2005 20:17
21 lines
2232 bytes
"Robert G. Hoover" <not.a.real.address@anywhere.sorry> wrote in 
message news:428a506b$1@newsgroups.borland.com...
>I tried \r\n as you suggested and I see the \r\n characters in my 
>TMemo. I don't understand why my \n is not being interpreted 
>correctly. If I hardcode the AnsiString with a \n in the middle, then 
>the TMemo displays the AnsiString as 2 lines, as expected. But, if I 
>use TButton->Hint and set that value in the Object Inspector, then I 
>get a \\n or \\r\\n in my AnsiString and a \n or \r\n in my TMemo 
>with no line breaks. If the debugger shows the string as containing a 
>\\r\\n, and assuming that that is what is stored in the AnsiString, 
>then that would explain why I see \r\n in the TMemo rather than a 
>linefeed... :(

The Object Inspector automatically escapes any forward slashes typed 
into it. So if you put "Hello\nThere" into the Caption property of a 
button using the OI, the OI is actually putting "Hello\\nThere" into 
the caption field.

HTH

Jonathan 
Technical Details
Message-ID: <428a5156$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42826ce0@newsgroups.borland.com> <428279f7$1@newsgroups.borland.com> <428a086f$1@newsgroups.borland.com> <428a1a01@newsgroups.borland.com> <428a27e9@newsgroups.borland.com> <428a2e7f$1@newsgroups.borland.com> <428a3c29@newsgroups.borland.com> <428a4de4$3@newsgroups.borland.com> <428a506b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,617c7c48d8598286
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jonathan Benedicto" <incorrect@no.server>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <42826ce0@newsgroups.borland.com> <428279f7$1@newsgroups.borland.com> <428a086f$1@newsgroups.borland.com> <428a1a01@newsgroups.borland.com> <428a27e9@newsgroups.borland.com> <428a2e7f$1@newsgroups.borland.com> <428a3c29@newsgroups.borland.com> <428a4de4$3@newsgroups.borland.com> <428a506b$1@newsgroups.borland.com>
Subject: Re: AnsiString and the LineFeed char
Date: Tue, 17 May 2005 16:17:27 -0400
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 64.231.16.168
Message-ID: <428a5156$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1116361046 64.231.16.168 (17 May 2005 13:17:26 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail