Admin Production ni-theme
Current Publication

Collapsible Regions

LabWindows/CVI

View»Collapsible Regions

You can use collapsible regions to help you view your code in smaller sections. The collapsible region is a column in the Source Window containing plus/minus boxes that appear next to blocks of code. The Collapsible Regions menu item contains a submenu with the following options for interacting with the collapsible region.

  • Collapse/Expand Region—Closes or opens the currently selected code block.
  • Collapse/Expand Region and Subregions—Closes or opens the currently selected block of code and its contained blocks of code.
  • Collapse All—Closes all code blocks.
  • Expand All—Opens all code blocks.
  • Highlight Code in Region—Highlights the code block in which the cursor is currently placed.
  • Go to Previous Region Boundary—Moves the cursor to the previous boundary.
  • Go to Next Region Boundary—Moves the cursor to the next boundary.

LabWindows/CVI defines code blocks based on lines enclosed by curly braces and blocks of comments that span at least three lines. You also can enclose lines of code with tags to define a region. When you collapse the code block, a dotted line appears in place of the code block.

Note Note  If you disable syntax coloring, LabWindows/CVI does not recognize collapsible regions for #ifdef directives, comments, and user-defined regions.

Place your mouse over the collapsible region to highlight the region in the column that corresponds to the code block. The highlight persists until you move your mouse to another part of the collapsible region. If you move your mouse away from the collapsible region and into the source code, the highlight persists in a lighter shade.

When you first open a file, all code blocks are expanded.

Note Note  You must enable the Show collapsible regions option in the Editor Preferences dialog box to display collapsible regions.