Code Folding Demo
Folder: Demos\Folding. Project: FoldingDemo.dproj.
Shows the code folding of the editor with three languages. The folder contains a sample file for each one: demo.cpp, demo.js and demo.py, opened with the actions C++, JavaScript and Python of the demo, that choose the highlighter too (SynEdit.Highlighter.Cpp, SynEdit.Highlighter.JScript, SynEdit.Highlighter.Python).
What you can try
- Enable and disable the folding (
UseCodeFolding). - Collapse and expand the blocks with the gutter, and with the fold actions bound to the commands
ecFoldAll,ecUnfoldAll,ecFoldNearest, the level commands... - Show the collapsed lines (
ShowCollapsedLine) and the hint marks (ShowHintMark). - Change the size of the folding shapes (
GutterShapeSize). - Show the line numbers in the gutter.
- Open, save, print and change the font of the editor with the standard actions.
The demo contains also the handler of the event OnScanForFoldRanges, an example of how to supply the folding ranges from your own code.
