Label - Object --- New line

 

Hi, a short question:


I would like to write a Text into a label object. The problem is, it doesnt make new lines.

eg.:

Spread: xx

Accountlevarage: xxx

Code:

string spread = "Spread: " + DoubleToStr((Ask-Bid)/Point/10,1) + "\nAccountlevarge: " + AccountLeverage();
ObjectSetText("Spread",spread,10, "Times New Roman", Yellow);

The \n is not workign here. Does somebody know how to make this working?

 
Konarer wrote >>

Hi, a short question:


I would like to write a Text into a label object. The problem is, it doesnt make new lines.

eg.:

Spread: xx

Accountlevarage: xxx

Code:

string spread = "Spread: " + DoubleToStr((Ask-Bid)/Point/10,1) + "\nAccountlevarge: " + AccountLeverage();
ObjectSetText("Spread",spread,10, "Times New Roman", Yellow);

The \n is not workign here. Does somebody know how to make this working?

label object won't take new line to display. If you want to show it in two difference line, just use two labels. It just some kind of drawback of MT4.

 
brother3th wrote >>

label object won't take new line to display. If you want to show it in two difference line, just use two labels. It just some kind of drawback of MT4.

ah ok, thx for the fast answer

Reason: