NT8 Get String Size (Used to be Graphics.MeasureString in NT7)
Hello NT8 Programmers Happy New Year,
I have been slaving over conversions from NT7 to NT8 lately and I ran into an issue that I just can't find the solution to.
Let's just get to the point. I am trying to build an arrow with text that doesn't overlap when you change the chart scale or zoom in and out (this I have figured out), but the issue now is when I try to have 2 arrows with text one above the other, and scale the chart of course. What I feel is missing is the ability to use a Grapics.MeasureString so I can get the size in pixels of the text and plot the arrow below or above what ever the case might be.
Does anyone have any idea how to "Measure String" in NT8 or something similar?
Ok so I solved the issue, kind of, and I will write it here if anyone else wants to do this sort of thing in the future.
First of all I got the price from arrow1 and I changed it to pixels, then I added a few pixels and the custom auto pixeling bit of code that accounts for the scaling of the arrows and, to my surprise that it worked, I added the size of the font to the arrow1 pixels, then transformed it all back to price and set arrow2 price to the newly calculated price.
I hope this helps anyone that comes across the same problem in the future.