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 NullPointStrategies, Today, 05:17 AM
          0 responses
          51 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          128 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          69 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X