Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

InHitTest

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

    InHitTest

    Hemlock asked a question some time ago here.

    I am a little confused because if I draw a rectangle using if(!InHitTest) or without it - I can't select that rectangle?
    Am I missing something.

    #2
    Hi Mindset, I'm not sure I follow you - so you draw a rectangle programmatically and then it's locked? This would be expected and you need to unlock it for manual access - http://www.ninjatrader.com/support/h...drawobject.htm

    Comment


      #3
      using plot override

      sorry I should have explained more fully.
      I am using graphics.DrawRectangle(...)
      I tried below but it doesn't seem to unlock the rectangle?

      foreach (IDrawObject draw in DrawObjects)
      {
      // Unlocks all draw objects for manual manipulation on the chart
      draw.Locked = false;
      }

      Comment


        #4
        I looked into Mindset and it appears that custom drawn rectangles generally not provide any of the object selection points you're used to from NS generated draw objects, however the InHitTest bool would be used to ensure the user could 'grab' the indicator and for example move to another panel or not. With the InHitTest check commented out on the CustomPlotSample you would see the indicator could be freely dragged around as desired.

        Comment


          #5
          Odd

          That's not the behaviour I see Bertrand - nothing changes on CustomSamplePlot ( I saved it as a separate indicator and removed the InHitTest as you suggested).
          I can't grab anything or move panels like other indicators.

          sorry - I can move the indicator but I still don't get any grab handles around the rectangle - isn't that expected?

          Comment


            #6
            Correct, you can move it as you like then, but there would be no object handles for the custom C# drawing.

            Comment


              #7
              Further edit

              I have just re read your answer. Can I put forward a request to allow grabhandles to be applied to custom drawn rectangles.

              Comment


                #8
                Sure - thanks for offering this suggestion, we've added it to our feedback list with reference # 912.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                576 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                334 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                553 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                551 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X