Board index » cppbuilder » Multi-line Label Captions

Multi-line Label Captions

In Delphi I can create multi-line Captions for Labels just by inserting
a crlf bew{*word*249} lines eg

      "Line 1"+#13+#10+"Line 2"+#13+#10+"Line 3"   etc

how ccan I achieve the same effect in C++?

(I have tried the above and also the /r/n approach).

 

Re:Multi-line Label Captions


"Line 1\r\nLine 2\r\nLine 3"

Within strings in C or C++ the \ character is an escape character and the
meaning of the following character is changed as follows :-

\n = newline
\r = carriage return
\\ = \ character

note that  the escape character is a backslash not a forward slash as you
have tried.

There is a whole section on this in the help file:  enter "escape sequences"
in the help
index for help on this.

John

Quote
"Geoff Marshall" <Geoff_Marsh...@gemsys.co.uk> wrote in message

news:3B4F4719.2C0F2E1B@gemsys.co.uk...
Quote
> In Delphi I can create multi-line Captions for Labels just by inserting
> a crlf bew{*word*249} lines eg

>       "Line 1"+#13+#10+"Line 2"+#13+#10+"Line 3"   etc

> how ccan I achieve the same effect in C++?

> (I have tried the above and also the /r/n approach).

Re:Multi-line Label Captions


Thanks,

Changing / to \ was the answer.

Geoff

Other Threads