Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IgnoresUserInput

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

    IgnoresUserInput

    I've got an indicator drawing a significant number of text objects on my chart and I would like to avoid accidentally clicking on and selecting those text objects.

    I can lock those text objects programmatically, but that does not prevent me from selecting them by accident on my chart. I attempted to set the IgnoresUserInput property to true, but the compiler told me that it is a read only property.

    The help guide seems to suggest that it can be set.


    #2
    Hello,

    It looks like we may need to clear up the documentation, and I'll make sure that it gets fixed.

    There is a bool in the IDrawingTool interface called IgnoresUserInput which is read-only, as you point out. However, there is a public bool property in the DrawingTool class with the same name which can be set, like so:

    Code:
                HorizontalLine hLine = Draw.HorizontalLine(this, "hello", High[10], Brushes.Blue);
    
                hLine.IgnoresUserInput = true;
    Dave I.NinjaTrader Product Management

    Comment


      #3
      For those that come after, I was trying to achieve the result by doing this:

      Code:
       Draw.Text(this, CurrentBar.ToString(), true, SWLText, Strength, Low[Strength] - TickSize * 2, LowOffset, SWLBrush, new SimpleFont("Arial", TextSize), TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 0);                     
      DrawObjects[CurrentBar.ToString()].IgnoresUserInput = true;
      And was unable to do so. The compiler informed me that IgnoresUserInput was read only.

      But when I did this:

      Code:
      Text text = Draw.Text(this, CurrentBar.ToString(), true, SWLText, Strength, Low[Strength] - TickSize * 2, LowOffset, SWLBrush, new SimpleFont("Arial", TextSize), TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 0);         
      text.IgnoresUserInput = true;
      On the suggestion of the previous post I got the desired result.

      Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      666 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      377 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X