Is there documentation somewhere about how to enable folding in the
StyledTextCtrl when using a container lexer (STC_LEX_CONTAINER)?
I'm trying to create what is effectively an outline tool, with levels
denoted by #. For example, I want to be able to hide child1 and child2
in the following data:
# parent
## child1
## child2
So, when I style a line and see something that begins with ## is a
child of a line that begins with a single #.
Thanks for the suggestion. I was calling SetFoldLevel but your comment
made me take a second look at my code. I realized I needed to set a
level that was OR'd with STC_FOLDLEVELHEADERFLAG. Once I did that I
was golden.
···
On Mon, Mar 29, 2010 at 3:40 PM, Cody Precord <codyprecord@gmail.com> wrote:
Hi,
On Mon, Mar 29, 2010 at 3:22 PM, Bryan Oakley <bryan.oakley@gmail.com> wrote:
Is there documentation somewhere about how to enable folding in the
StyledTextCtrl when using a container lexer (STC_LEX_CONTAINER)?
I'm trying to create what is effectively an outline tool, with levels
denoted by #. For example, I want to be able to hide child1 and child2
in the following data:
# parent
## child1
## child2
So, when I style a line and see something that begins with ## is a
child of a line that begins with a single #.
You will probably have to dig into the Scintilla docs but I think you
need to call SetFoldLevel on each line with the appropriate
STC_FOLDLEVEL* flag depending on the context of the line.
Also see SetLineState