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 Mindset, Today, 06:46 AM
      0 responses
      8 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, Yesterday, 05:21 PM
      0 responses
      14 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      15 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      82 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      48 views
      0 likes
      Last Post PaulMohn  
      Working...
      X