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 cmoran13, 04-16-2026, 01:02 PM
        0 responses
        36 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        23 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        162 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        96 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        152 views
        2 likes
        Last Post CaptainJack  
        Working...
        X