web design by bluetit

Code Folding extended SynEdit


Mystix uses the SynEdit component that was changed by me to support the code folding feature. It is based on the 2.0.1 version of the original component. You can use it in your own software on the same license as the original SynEdit.


To enable code folding, set SynEdit.CodeFolding.Enabled to True. Fold regions can be added only at run-time. You can add fold regions directly to SynEdit control or to the highlighter. Which does apply is controled by the CodeFolding.UseHighlighterFoldRegions property. First method that need to be called after adding fold regions is InitCodeFolding. After that you only need to call RescanForFoldRegions if you modify the buffer directly (eg. you add some lines, or modify the SynEdit.Text property somehow). You should use SynEdit.GetUncollapsedStrings function instead of SynEdit.Lines property.

This page is valid html 4.01 and valid css