Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

(B4) Draw.Text () issues

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    (B4) Draw.Text () issues

    I am drawing a text box near the cursor. That was working fine in B3, but is not so fine in B4. Some of the differences are just that -- differences -- and I have adjusted to them. Some issues remain, though:

    1) There seems to be an adverse interaction with autoscale. I had it turned on in B3, and it worked fine. Not so fine in B4, so I turned it off (confirmed by looking at the Text instance in VS). Even with Text's autoscale off, as I move the cursor (and therefore the text box) up and down the price plot gets more and more compressed. That is true even when I am very careful to not get the text box anywhere near the top or bottom of the chart. Anything that forces the chart to redraw (e.g. F5, or moving the chart left or right) restores the vertical scale properly. Any information on why that happens would be most welcome -- right now it looks to me as if the interaction between text box and autoscale got broken.

    2) There is a Text data member that is potentially VERY helpful for positioning the text box -- layoutRect. Unfortunately, it is not usable, due to its protection level. PLEASE make this publicly readable! All of my positioning to date has been a seat-of-the-pants hack; using layoutRect has the potential to make positioning finally be correct.

    (BTW: for those who counseled using Font.Size -- that is 12, while the true line height is about 13.8. I have hard-coded the value discovered with the debugger, but that will, of course, be wrong if I change the font I am using. layoutRect really does need to be publicly visible.)

    --EV
    Last edited by ETFVoyageur; 09-11-2015, 02:09 AM.

    #2
    Please excuse me if this is slightly off the topic of your discussion, but since you're discussing Draw.Text and Autoscale, I'd like to report that in my experience setting Autoscale to true in the Draw.Text method does not protect text that is drawn above or below a bar from being pushed entirely off the chart. (Note: when my code was written for NT7, it worked fine.)

    Also, and I know this is a very small item, but when text is drawn on the right side of a price bar using TextAlignment.Left, the left side of the outline and fill area overlap the center line of the price bar by about 4 pixels; whereas if text is drawn on the left side of the price bar using TextAlignment.Right, the right side of the outline and fill area lines up perfectly with the center line of the price bar. IMHO, it would look better if they both lined up with the center line.

    Comment


      #3
      I reported the alignment bug in Beta 3. I just checked and it is still there in B4.

      --EV

      Comment


        #4
        Hello EV,

        Thank you for your patience.

        For item 1, I am not seeing the behavior in Beta 5. Are you able to re-create this in Beta 5 as well?

        For the second item, I will forward this to Product Management.

        I look forward to your response.
        Last edited by NinjaTrader_PatrickH; 10-02-2015, 07:42 AM.

        Comment


          #5
          Hello jrcarter,

          Thank you for reporting this item.

          I am able to re-create the exact same behavior on my end and I will report this to our development team.

          Comment


            #6
            Originally posted by NinjaTrader_PatrickH View Post
            Hello EV,

            Thank you for your patience.

            For item 1, I am not seeing hte behavior in Beta 5. Are you able to re-create this in Beta 5 as well?
            Yes, the behavior is still there in Beta 5, and it is VERY annoying. I'm about to take a more detailed look at it if I can.

            For the second item, I will forward this to Product Management.

            I look forward to your response.
            Thank you. Access to that would be very helpful.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by pechtri, 06-22-2023, 02:31 AM
            9 responses
            122 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by frankthearm, 04-18-2024, 09:08 AM
            16 responses
            66 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by habeebft, Today, 01:18 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by benmarkal, Today, 12:52 PM
            2 responses
            15 views
            0 likes
            Last Post benmarkal  
            Started by f.saeidi, Today, 01:38 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X