Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Expand and collapse parts of the code in the Editor

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

    Expand and collapse parts of the code in the Editor

    Hello

    Is it possible to create a little cross to expand/collapse parts of the code just like the little cross in #region Using Declarations?

    Thanks for your help!

    #2
    Hello roblogic,

    Thanks for your post.

    Yes, you can follow the same format #region #endregion in your source code and can have as many sections as you wish.

    #region MySectionName
    .
    .// all your code in the section
    .
    #endregion

    would display MySectionName with the little cross to the left of it.

    Reference: https://docs.microsoft.com/en-us/dot...ocessor-region
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Great thanks!

      Comment


        #4
        Hello,

        I am using the above with the Shortcuts in "Hot Keys". Is it possible to prevent some specific regions to Collapse or Expand when the shortcut for Expand All or Collapse All is triggered?

        Comment


          #5
          Hello roblogic,

          Thanks for your reply.

          It looks like the hotkey selections are only for collapsing or expanding all.

          I am not aware of a means to selectively expand and collapse other than left clicking on the + symbol to the left of #region.


          Paul H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by fitspressoburnfat, Today, 04:25 AM
          0 responses
          2 views
          0 likes
          Last Post fitspressoburnfat  
          Started by Skifree, Today, 03:41 AM
          1 response
          4 views
          0 likes
          Last Post Skifree
          by Skifree
           
          Started by usazencort, Today, 01:16 AM
          0 responses
          1 view
          0 likes
          Last Post usazencort  
          Started by kaywai, 09-01-2023, 08:44 PM
          5 responses
          603 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          6 responses
          23 views
          0 likes
          Last Post xiinteractive  
          Working...
          X