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 Belfortbucks, Today, 09:29 PM
      0 responses
      6 views
      0 likes
      Last Post Belfortbucks  
      Started by zstheorist, Today, 07:52 PM
      0 responses
      7 views
      0 likes
      Last Post zstheorist  
      Started by pmachiraju, 11-01-2023, 04:46 AM
      8 responses
      151 views
      0 likes
      Last Post rehmans
      by rehmans
       
      Started by mattbsea, Today, 05:44 PM
      0 responses
      6 views
      0 likes
      Last Post mattbsea  
      Started by RideMe, 04-07-2024, 04:54 PM
      6 responses
      33 views
      0 likes
      Last Post RideMe
      by RideMe
       
      Working...
      X