Indicator Draw text alignment got messed up with last update
Indicator Draw text alignment got messed up with last update
20 May 2013, 07:39
The last update messed up the alignments for DrawText. I was able to center my text using a negetive alignment but now it will not work.
string strLondonLabel=string.Format("{0,-60}","London");
this used to align the text left but it no longer works properly. PLease check the indicator below, you can see how it is supposed to look but after the last update it no longer centers properly
Replies
cAlgo_Development
20 May 2013, 17:18
We've found the bug. The problem is that leading spaces are ignored when we align text now. It will be fixed in the next release. Temporary solution you can apply without dramatic changes in your indicator is following:
Add point or another small symbol to the end to get string like "London ." instead of "London ", this is not so nice but it works:
string strLondonLabel = string.Format("{0,-60}.", "London"); string strNYLabel = string.Format("{0,-20}.", "NY"); string strSydneyLabel = string.Format(".{0,25}", "Sydney"); string strTokyoLabel = string.Format(".{0,60}", "Tokyo"); string format = paramFormat24HR == 1 ? "H:mm" : "h:mmtt"; string strLondonTime = string.Format("\n{0,-60}.", LondonTime.ToString(format)); string strNYTime = string.Format("\n{0,-25}.", NYTime.ToString(format)); string strSydneyTime = string.Format("\n.{0,25}", SydneyTime.ToString(format)); string strTokyoTime = string.Format("\n.{0,60}", TokyoTime.ToString(format));
@cAlgo_Development
cAlgo_Fanatic
20 May 2013, 12:01
We are investigating this. This bug is related to our change that improves text rendering performance.
@cAlgo_Fanatic