1. Computing & Technology

Discuss in my forum

in Delphi TIPS ::

In Delphi 2006 (both Win32 and .Net) 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.

Read the full tip to learn how to Create Collapsible Code Blocks in Delphi Code Editor using the {$REGION} directive.

Related: A First Look at (Borland Developer Studio) Delphi 2006 | Using Delphi Compiler Directives | How to enable .NET Compiler Warnings when using the dcc32 compiler?

Comments
November 13, 2009 at 10:08 am
(1) Ken Knopfli :

How do I stop them from jumping open all the time?

The slightest syntax error, and you can go through your entire file closing the ones you don’t want right now.

C# regions do not do that. (I have D2007)

November 13, 2009 at 5:06 pm
(2) Brian E :

You can’t since the collapsed/expanded state of regions in Delphi isn’t saved. It’s a useless feature as implemented because the collapsed state is so transient.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>
Related Searches delphi code code blocks delphi

©2012 About.com. All rights reserved.

A part of The New York Times Company.