I was wondering if there is an equivalent to Visual Studio’s #regions in RAD Studio.
We use Delphi and C++builder IDEs where I work and I would love to be able to use something like regions.
My coworkers and I have yet to find an equivalent way of grouping code… do you know of any?
You can apply a special {$REGION ‘Region Name’} directive to mark a “named” collapsible regions in the code editor.
To mark code as a region, surround it with the REGION and ENDREGION directives. You may include a caption that will be displayed when the code is folded and hidden.
Here’s an exampe of the two (nested) regions:
To fold or unfold a region, click on the [+] (if expanded) or [-] (if collapsed) marker left to the $region directive. This will look:
alt text http://z.about.com/d/delphi/1/G/o/a/coderegions.gif