Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sorting Groups of Controls

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

    Sorting Groups of Controls

    I have three different Groupnames with various controls. I am using the Order attribute to set the order within the group. How do I set the order of the Groups themselves?

    #2
    Hello swooke,

    Thanks for your post.

    The CategoryOrder Attribute could be used for this task.

    Code:
    [Gui.CategoryOrder("My Strings", 1)] // display "My Strings" first
    [Gui.CategoryOrder("My Bools", 2)] // then "My Bools"
    [Gui.CategoryOrder("My Ints", 3)] // and finally "My Ints"
    public class MyCustomIndicator : Indicator
    {
      #region Properties   
     
      [Display(GroupName="My Ints")]
      public int MyCustomInt
      { get; set; }
      
      [Display(GroupName="My Bools")]
      public bool MyCustomBool
      { get; set; }
     
      [Display(GroupName="My Strings")]
      public string MyCustomString
      { get; set; }
     
      #endregion
    }
    CategoryOrder Attribute - https://ninjatrader.com/support/help...rattribute.htm

    Please let us know if there is anything else we can do to help.

    Comment


      #3
      Where in the overall code is this part of the code placed - Thanks

      [Gui.CategoryOrder("My Strings", 1)] // display "My Strings" first
      [Gui.CategoryOrder("My Bools", 2)] // then "My Bools"
      [Gui.CategoryOrder("My Ints", 3)] // and finally "My Ints"

      Comment


        #4
        Hello DTSSTS,

        Thanks for your note.

        This code would be placed at the class level in your script as seen in the code that was shared by my colleague Jim.

        See the attached reference sample demonstrating this.

        Let us know if we may assist further.
        Attached Files
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Perfect. Thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          599 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          344 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          558 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          557 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X