Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Hidding a brush from the indicator properties dialog.

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

    Hidding a brush from the indicator properties dialog.

    Hello!
    I have successfully rendered a text. The idea is to prevent the user of changing the color oft he text. In OnBarupdate(), I would have done the following: myColor = Brushes.Green;
    But OnRender() does not accept this declaration/initialization.
    In the section properties, I have the following code:

    HTML Code:
    [XmlIgnore]
    [Display(Name = "MyColor", GroupName = "Parameters")]
    public Brush MyColorBrush
    {
       get { return myColorBrush; }
       set { myColorBrush = value; }
    }
    
    [Browsable(false)]
    public string MyColorBrushSerialize
    {
        get { return Serialize.BrushToString(MyColorBrush); }
        set { MyColorBrush = Serialize.StringToBrush(value); }
    }​


    Is it possible of rendering a text and preventing the text color of being changed? If yes, could one please guides me here?

    Best regards

    #2
    Hello Stanfillirenfro,

    You can add Browsable(false) like you have on the other property to hide that from the UI as well. In that situation you could just use a private variable since it won't be configurable.

    Comment


      #3
      Many thanks NinjaTrader_Jesse for your reply.

      Awsome! Problem solved!

      Thanks again!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      577 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X