Setting #Region Form the IDE menu

Discussion in 'Basic4ppc Wishlist' started by Cableguy, Sep 6, 2008.

  1. Cableguy

    Cableguy Expert Licensed User

    Hi, I've noticed that the more experienced programers tend to "clean-up" the IDE screen with a bunch of #region's...
    I've tryed to do that, but it only get the #Region and #End Region strings highlighted in red...
    And I do can collapse the code..
    SO ....the ability to define Regions from the IDE menu, would be of great help...
    Yes I known we can already colpase the subs...
    But imagine I have a prog with a few dozen subs, and could reduce them to only 3 or 4 colapsable Regions...
    that would tidy up my IDE's screen...
     
    Last edited: Sep 6, 2008
  2. agraham

    agraham Expert Licensed User

    I'm afraid that I don't understand the problem. Why can't you do that with #Region and #End Region? :confused:
     
  3. Cableguy

    Cableguy Expert Licensed User

    it would just be easier to use, thats all...
    just like the Comment feature...
    define a piece of code, select region and that all...
     
  4. Zenerdiode

    Zenerdiode Active Member Licensed User

    Just use:

    Code:
    #Region <Region Name> 'Optional comment text
    Sub FirstSub
       
    MsgBox("FirstSub")
    End Sub

    Sub SecondSub
       
    MsgBox("SecondSub")
    End Sub
    #End Region
    The next time you open your code in the IDE the region will be collapsed as default. You are remembering to name the region, aren't you?
    The region may be collapsed manually as soon as it is created.
     
  5. Cableguy

    Cableguy Expert Licensed User

    What I was sugesting was to be able to do it from one of the IDE's menu, just like the Block Commenting feature...
     
  6. Cableguy

    Cableguy Expert Licensed User

    Another related feature would be that the subs that were colapsed( not by #Region but by b4ppc) at exit time, would be colapsed at load time...
    At the moment ALL subs apear expanded at load time...
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice