locked
Close / Open All Regions? RRS feed

  • Question

  • Alright, I am about to ask what I am assuming is a tremendously stupid question, but it has been driving me insane...

    I recently started using regions.  As my applications get bigger it just seems like a good way of organizing things.  From a usability standpoint it would make sense for there to be a way to open and close all regions (Thus giving you a clean view of everything and not having to scroll through a lot of unnecessary code).  The shortcuts I found online though "Ctrl-M Ctrl-L close / open everything...  So if you close all regions, then open one all of the event handlers are collapsed now...  Is there a way to just collapse the regions?  It seems to me like this would be a feature in there somewhere.  I couldn't find a toolbar button that did that or anything either...

    I'm just a bit confused here.

    Thanks everybody.
    Wednesday, February 11, 2009 2:34 PM

Answers

  • Try right-clicking, then look at the bottom for "Outlining".  Play with those options.  Different changes are made depending upon the state of your outlines.  I have never figured what set of circumstances will make toggle regions, but it does for me time to time.  It is usually not what I was looking for either at the time.

    You could create partial class files, too, you know.  Or perhaps it is even time to consider separate classes.

    Rudedog   =8^D
    Mark the best replies as answers. "Fooling computers since 1971."
    Wednesday, February 11, 2009 5:22 PM
  • Rudedog2 is right:

    To close all regions:
    1.) Right-click --> Outlining --> Collapse to Definitions
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, February 11, 2009 8:16 PM
  • JohnGrove said:

    Rudedog2 is right:

    To close all regions:
    1.) Right-click --> Outlining --> Collapse to Definitions


    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com



    Suprised.  My profile says "The right mouse button is my friend.  Make it yours, too."

    Newbie, that trick works on selected highlighted text, too.  Files with more than 200 lines of code are too big for my brain.  Use partial class files.............
    Mark the best replies as answers. "Fooling computers since 1971."
    Wednesday, February 11, 2009 8:29 PM

All replies

  • Try right-clicking, then look at the bottom for "Outlining".  Play with those options.  Different changes are made depending upon the state of your outlines.  I have never figured what set of circumstances will make toggle regions, but it does for me time to time.  It is usually not what I was looking for either at the time.

    You could create partial class files, too, you know.  Or perhaps it is even time to consider separate classes.

    Rudedog   =8^D
    Mark the best replies as answers. "Fooling computers since 1971."
    Wednesday, February 11, 2009 5:22 PM
  • Rudedog2 is right:

    To close all regions:
    1.) Right-click --> Outlining --> Collapse to Definitions
    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com
    Wednesday, February 11, 2009 8:16 PM
  • JohnGrove said:

    Rudedog2 is right:

    To close all regions:
    1.) Right-click --> Outlining --> Collapse to Definitions


    John Grove - TFD Group, Senior Software Engineer, EI Division, http://www.tfdg.com



    Suprised.  My profile says "The right mouse button is my friend.  Make it yours, too."

    Newbie, that trick works on selected highlighted text, too.  Files with more than 200 lines of code are too big for my brain.  Use partial class files.............
    Mark the best replies as answers. "Fooling computers since 1971."
    Wednesday, February 11, 2009 8:29 PM