Announcement

Collapse
No announcement yet.

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

    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.


          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          90 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          137 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          68 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          120 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          72 views
          0 likes
          Last Post PaulMohn  
          Working...
          X