PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • How to proceed?
  • Collapsing an existing code
  • Expanding a code
  • Defining a set of code lines 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
Collapsing the code is used to simplify the reading of the code by only displaying the comments found in front of code lines.
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 code lines can be collapsed:
  • the code lines corresponding to a specific code structure: the conditional statements (IF, CASE, WHEN EXCEPTION), the declarations of global variables, constants, structures, ...
  • the code lines preceded by a comment.
  • the specific code lines, defined by the developer.
  • the code lines corresponding to a multiline string.
  • Versions 22 and later
    the code lines of a process.
    New in version 22
    the code lines of a process.
    the code lines of a process.
Versions 19 and later
You also have the ability to declare custom code blocks to collapse.
New in version 19
You also have the ability to declare custom code blocks to collapse.
You also have the ability to 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:
    • select "Code .. Collapsible code .. Collapse".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.
Note: The "Code .. Collapsible code .. Collapse all" option is used to collapse all the collapsible code lines in the current process.Note: To collapse all the collapsible code lines 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:
    • select "Code .. Collapsible code .. Expand".on the "Display" pane, in the "Collapsible code" group, expand "Collapse" and select "Expand".
    • press [CTRL] + the "+" key on the numeric keypad
Note: The "Code .. Collapsible code .. Expand all" option is used to expand all the collapsed code lines in the current process.Note: To expand all the collapsed code lines in the current process, on the "Display" pane, in the "Collapsible code" group, expand "Collapse" and select "Expand all".

Defining a set of code lines to collapse/expand

To specifically define the code lines to collapse/expand:
  1. In the code editor, select the different code lines that can be collapsed/expanded.
  2. Select "Code .. Collapsible code .. Collapse the selection".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.
Note: To permanently expand this set of code lines:
  1. Position the mouse cursor on this code.
  2. Select "Code .. Collapsible code .. Expand permanently".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>
or
<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:
New in version 19

Declaring a custom code block

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

...

<END>
or
<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:

Declaring a custom code block

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

...

<END>
or
<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:
Limits
WEBDEV - Server code Collapsing/Expanding code is not available in the page templates.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment