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 pechtri, 06-22-2023, 02:31 AM
      6 responses
      117 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Started by birdog, 01-25-2023, 08:10 PM
      2 responses
      161 views
      1 like
      Last Post RickAce
      by RickAce
       
      Started by stafe, 04-15-2024, 08:34 PM
      12 responses
      59 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by benmarkal, Today, 12:52 PM
      0 responses
      6 views
      0 likes
      Last Post benmarkal  
      Started by Tim-c, Today, 03:54 AM
      3 responses
      13 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Working...
      X