Is there a outlining changed event?

SyntaxEditor for Windows Forms Forum

Posted 8 months ago by Marc Beeson - Precision Mining
Version: 20.1.0400
Avatar

The old version had a SyntaxEditor.DocumentOutliningNodeExpandedChanged event. I am struggling to find an equivalent event in the new version.

We utilised this method to set the background colour of each line depending on it's state, except now we are using the AdornmentManager pattern to set background colours. However without knowing when a region has been collapsed/expanded, we cannot each line background colour.

Is there an event to know when a outlining node has been collapsed or expanded?

[Modified 8 months ago]

Comments (3)

Posted 8 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Marc,

While I don't believe we have an event exactly like that now, outlining is performed via the tagging system where ICollapsedRegionTag tags are supplied to specify where collapsed region ranges are.  If you make a tag aggregator for that ICollapsedRegionTag type, it will get notified when there are changes to outlining.

That being said, I'm not sure you even have to do any of that.  Whenever the view line is changed (which should happen when you collapse/expand an outlining node), the view line is rebuilt and any attached adornment managers should be notified again.


Actipro Software Support

Posted 8 months ago by Marc Beeson - Precision Mining
Avatar

I thought the adornment manager would call the draw DrawAdornmentCallback for the view lines that become visible when a region is expanded, but all I am seeing is the view line that contains the region header view line getting rebuilt if the region is expanded and a manual InvalidateViews is called. Maybe a bug?

The tag aggregator approach works well enough for our purposes though, so this problem is solved.

[Modified 8 months ago]

Posted 8 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Marc,

As the other view lines get added back in I would expect them to also be examined by adornment managers.  I'm glad you have the tag aggregator approach to help you get past the problem.


Actipro Software Support

The latest build of this product (v2020.1 build 0402) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.