You can align them to the right, by using a right anchor.
I don't know if there is a font with all characters the same width in pixels, that way they would line up nicely, but maybe look odd?
..... if there is a font with all characters the same width in pixels, that way they would line up nicely, but maybe look odd?
Courier New
Hello,
Not sure why this is so difficult, but I am trying to line up numeric output on a chart use an OBJ_LABEL object.
I want numbers to be vertically displayed and right aligned. The printf() function doesn't seem to do this
correctly, I have also tried using TextGetSize() and adjusting each string x coordinate (containing a number with 2 decimal
places) within a fixed pixel buffer. TextOut() may be the answer but I'm stumped trying to get that to work.
If anyone has solved this problem, I would greatly appreciate any assistance.
Thanks,
Phred
Thanks for the suggestions everyone. I tried the first one from GumRai and it worked perfectly!! Thanks for the help.
Phred
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
Not sure why this is so difficult, but I am trying to line up numeric output on a chart use an OBJ_LABEL object.
I want numbers to be vertically displayed and right aligned. The printf() function doesn't seem to do this
correctly, I have also tried using TextGetSize() and adjusting each string x coordinate (containing a number with 2 decimal
places) within a fixed pixel buffer. TextOut() may be the answer but I'm stumped trying to get that to work.
If anyone has solved this problem, I would greatly appreciate any assistance.
Thanks,
Phred