PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • How to proceed?
  • Collapsing an existing code
  • Expanding a code
  • Defining a set of lines of code to collapse/expand
  • Declaring a custom code block
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
The code is collapsed to improve readability, by only displaying the comments in front of the lines of code.
You can collapse a code that is already known and checked.
Collapsing this code is used to free space in the code editor. The code becomes clearer and more readable.
Several types of lines of code can be collapsed:
  • the lines of code corresponding to a specific code structure: the conditional statements (IF, CASE, WHEN EXCEPTION), the declarations of global variables, constants, structures, ...
  • the lines of code preceded by a comment.
  • the specific lines of code, defined by the developer.
  • the lines of code corresponding to a multiline string.
  • Versions 22 and later
    the lines of code of a process.
    New in version 22
    the lines of code of a process.
    the lines of code of a process.
Versions 19 and later
You can also declare custom code blocks to collapse.
New in version 19
You can also declare custom code blocks to collapse.
You can also declare custom code blocks to collapse.
No code is collapsed by default.
Example of expanded code:
Example of collapsed code:
How to proceed?

Collapsing an existing code

A code that can be collapsed is preceded by the "-" sign.
To collapse an existing code, you can:
  • click the "-" icon found in front of the statement. Only the comment line preceding the statement will remain visible.
  • display the popup menu of the "-" icon and select "Collapse".
You can also:
  1. Move the edit cursor into the code to collapse.
  2. Use one of the following methods:
    • on the "Display" pane, in the "Collapsible code" group, expand "Collapse" and select "Collapse".
    • press Ctrl + the "-" key on the numeric keypad
When a collapsed code is hovered by the mouse cursor, a tooltip displays a section of the collapsed code.
Remark: To collapse all the collapsible lines of code in the current process, on the "Display" pane, in the "Collapsible code" group, expand "Collapse" and select "Collapse all".

Expanding a code

A code that can be expanded is preceded by the "+" sign.
To expand a code, you can:
  • click the "+" icon found in front of the code to expand.
  • display the popup menu of the "+" icon and select "Expand".
You can also:
  1. Move the edit cursor into the code to expand.
  2. Use one of the following methods:
    • on the "Display" pane, in the "Collapsible code" group, expand "Collapse" and select "Expand".
    • press Ctrl + the "+" key on the numeric keypad
Remark: To expand all the collapsed lines of code in the current process, on the "Display" pane, in the "Collapsible code" group, expand "Collapse" and select "Expand all".

Defining a set of lines of code to collapse/expand

To specifically define the lines of code to collapse/expand:
  1. In the code editor, select the different lines of code that can be collapsed/expanded.
  2. On the "Display" pane, in the "Collapsible code" group, expand "Collapse" and select "Collapse the selection".
The code is immediately collapsed and the "+" icon is displayed in front of the code.
Remark: To permanently expand this set of lines of code:
  1. Position the mouse cursor on this code.
  2. On the "Display" pane, in the "Collapsible code" group, expand "Collapse" and select "Expand permanently".
Versions 19 and later

Declaring a custom code block

To declare a custom code block, use the following syntax:
<BLOCK>

...

<END>
where
<BLOCK Comment always displayed>

...

<END>
These blocks of code are used for example to highlight the different steps of an algorithm or to group the declarations of variables or members.
Example:
See the help about BLOCK for more details.
New in version 19

Declaring a custom code block

To declare a custom code block, use the following syntax:
<BLOCK>

...

<END>
where
<BLOCK Comment always displayed>

...

<END>
These blocks of code are used for example to highlight the different steps of an algorithm or to group the declarations of variables or members.
Example:
See the help about BLOCK for more details.

Declaring a custom code block

To declare a custom code block, use the following syntax:
<BLOCK>

...

<END>
where
<BLOCK Comment always displayed>

...

<END>
These blocks of code are used for example to highlight the different steps of an algorithm or to group the declarations of variables or members.
Example:
See the help about BLOCK for more details.
Limits
WEBDEV - Server code Collapsing/Expanding code is not available in the page templates.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment