Is there a way to have 2 lines of text using the Drawtext method?

Created at 19 Apr 2013, 20:38
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
lec0456's avatar

lec0456

Joined 14.11.2012

Is there a way to have 2 lines of text using the Drawtext method?
19 Apr 2013, 20:38


When using static positioning is there a way to have 2 lines of text using the Drawtext method?


@lec0456
Replies

kricka
20 Apr 2013, 06:31

Hi lec0456,

I've been trying as well to be able to place certain variables on a specific place on the chart. Seems at the moment we're bound to TopRight-Left, BottomLeft-Right, and Center. I manage to use a "space" varibale to fit more info into these places. Its a workaround and the best solotion would be a X and Y coordinates for easy layout. Hope a upgrade is coming soon on the Drawtext method, we definitly need it!


@kricka

algotrader
20 Apr 2013, 10:16

RE:
lec0456 said:

When using static positioning is there a way to have 2 lines of text using the Drawtext method?

 ChartObjects.DrawText("a", "first line\nsecond line", StaticPosition.TopLeft);


@algotrader

lec0456
21 Apr 2013, 01:55

Wow, Thanks algotrader!  That worked like a charm.  I could have sworn I tried that but I must have had the backslash instead of the forward slash.  Thanks again


@lec0456