Board index » cppbuilder » Carriage Return in TMemo

Carriage Return in TMemo

Hey,

Does anybody know how to do a cariage return in TMemo object in Borland
C++?? I know if it would be a console prog using cout, I would use a '\n' or
'\r'. But I am complete beginner in VCL.
I need to make a new line in a TMemo box.
Can anybody help me?

Arsen

 

Re:Carriage Return in TMemo


Hello,

Sorry, I don't understand exactly the problem. I think what you mean is the
same as:
 TMemo->Lines->Add("$0A$13");
Or isn't it?

MfG
H.L

"Arsen Milman" <almil...@bellsouth.net> schrieb im Newsbeitrag
news:3b4c9797_2@dnews...

Quote
> Hey,

> Does anybody know how to do a cariage return in TMemo object in Borland
> C++?? I know if it would be a console prog using cout, I would use a '\n'
or
> '\r'. But I am complete beginner in VCL.
> I need to make a new line in a TMemo box.
> Can anybody help me?

> Arsen

Re:Carriage Return in TMemo


Hello,

Sorry, I don't understand exactly the problem. I think what you mean is the
same as:
TMemo->Lines->Add("$0A$13");
Or isn't it?

 MfG
H.L

Re:Carriage Return in TMemo


Quote
"Arsen Milman" <almil...@bellsouth.net> wrote in message

news:3b4c9797_2@dnews...

Quote
> I need to make a new line in a TMemo box.

Try "\r\n"

Chris.

Re:Carriage Return in TMemo


I checked if your way works and it does, perfectly. That solved my problem.
Thank you very much!

Quote
Herbert Leipski <mail...@leipski.de> wrote in message

news:3b4cb9fa$1_1@dnews...
Quote
> Hello,

> Sorry, I don't understand exactly the problem. I think what you mean is
the
> same as:
> TMemo->Lines->Add("$0A$13");
> Or isn't it?

>  MfG
> H.L

Re:Carriage Return in TMemo


Hi, Arsen.

Quote
Arsen Milman wrote:

> I checked if your way works and it does, perfectly. That solved my problem.
> Thank you very much!

> Herbert Leipski <mail...@leipski.de> wrote in message
> news:3b4cb9fa$1_1@dnews...
> > Hello,

> > Sorry, I don't understand exactly the problem. I think what you mean is
> the
> > same as:
> > TMemo->Lines->Add("$0A$13");

The encoding looks like Delphi -- I thought that it should be:

        TMemo->Lines->Add("\x0a\x0d");

So the "$" stuff works?  (Just curious.)

robert

Re:Carriage Return in TMemo


That should be this instead:

    Memo1->Lines->Add("\r\n");

However, that has the effect of simply inserting a blank line into the memo,
which can also be accomplished like this as well:

    Memo1->Lines->Add("");

Gambit

Quote
"Robert Dunn" <robertd...@worldnet.att.net> wrote in message

news:3B4F9830.2D187672@worldnet.att.net...
Quote
> The encoding looks like Delphi -- I thought that it should be:

> TMemo->Lines->Add("\x0a\x0d");

Other Threads