Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Expand/contract GridCategory in code

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

    Expand/contract GridCategory in code

    I have several GridCategory sections for a custom indicator. Whenever I open the Indicators dialog, they are all expanded. I would like to be able to set some of them to be contracted by default as, for example, the default is for individual Plots, where Color, Dash style, etc., are hidden until the user clicks the + icon. Is there a way to code this behavior? Somewhere in here, perhaps?:
    Code:
            [Description("Line color for Opening Range High")]
            [GridCategory("Colors")]
            [Gui.Design.DisplayNameAttribute("O.R. High Color")]
            public Color OrHighColor
            {
                get { return orHighColor; }
                set { orHighColor = value; }
            }
    Thanks!

    #2
    Hello tradesmart,
    Welcome to the forum and I am happy to assist you.

    Unfortunatley I am not aware of it. However instead of creating various Color, DashStyle etc property you can create a single Pen property which will contain all the color, dashstyle etc values.
    Defines an object used to draw lines and curves. This class cannot be inherited.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Thanks for your response. However, I am quite aware of using Pen's various attributes, but that was not my question. I want a way to collapse, by default, specific GridCategory containers in the Indicators dialog box. I only mentioned Plots as an example of how the various Pen properties of that category are collapsed by default: if the user wants to change a plot color, he has to first click the + icon to expand the tree. That's the behavior I'd like to be able to code.

      Comment


        #4
        Unfortunately this would not be possible with supported NinjaScript, but I have this added to our product management enhancement tracking lists to potentially consider for a future upgrade of the platform.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        633 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X