Article View: borland.public.cppbuilder.nativeapi
Article #6346Re: AnsiString and the LineFeed char
From: Robert G. Hoover
Date: Tue, 17 May 2005 20:13
Date: Tue, 17 May 2005 20:13
32 lines
2480 bytes
2480 bytes
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... :( Rob Remy Lebeau (TeamB) wrote: > "Robert G. Hoover" <not.a.real.address@anywhere.sorry> wrote in message > news:428a3c29@newsgroups.borland.com... > > >>I see in the AnsiString... >> >>"click here\\nto do something" > > > That is not what is contained in the actual AnsiString memory, that is > merely how the debug inspector displays it visually. > > > Gambit > >
Technical Details
Message-ID:
<428a506b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!newsfeed.kamp.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<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>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,617c7c48d8598286 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 17 May 2005 16:13:30 -0400 From: "Robert G. Hoover" <not.a.real.address@anywhere.sorry> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: AnsiString and the LineFeed char 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> In-Reply-To: <428a4de4$3@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0520-1, 05/17/2005), Outbound message X-Antivirus-Status: Not-Tested NNTP-Posting-Host: 68.48.159.204 Message-ID: <428a506b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1116360811 68.48.159.204 (17 May 2005 13:13:31 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!newsfeed.kamp.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail