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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      48 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      30 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      99 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      177 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      170 views
      0 likes
      Last Post CarlTrading  
      Working...
      X