Add Squiggled lines in SyntaxLanguage.PlainText;

SyntaxEditor for Windows Forms Forum

Posted 4 years ago by Sylko Zschiedrich
Version: 19.1.0341
Avatar

Hi all,

Is there a simple way to add squiggled lines in the new SyntaxEditor (v20.1.0400). I checked out the sample application and found the step by step example with a full parser and so on to add squiggled lines.

Is there a simpler way ta add these lines to a text language?

The (simplified) code we used before looks like this:

SpanIndicatorLayer layer = Document.SpanIndicatorLayers[SpanIndicatorLayer.SyntaxErrorKey];

SyntaxErrorSpanIndicator indicator = new SyntaxErrorSpanIndicator();

...

layer.Add(indicator, offset, length);

Thanks for you help

Sylko

[Modified 4 years ago]

Comments (1)

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Sylko,

Yes, squiggle lines are added via tagged ranges using ISquiggleTag instances.  The AdornmentsSquigglesIntro QuickStart shows an example of adding squiggle tags without a parser.  The example there shows a tagger that examines lines on the fly as they are displayed and returns tagged ranges as appropriate.

In other cases, if you have a fixed set of tagged ranges that you know about, you might want your tagger to be a CollectionTagger<ISquiggleTag> instead.  The CollapsedRegionsIntro QuickStart shows an example of that kind of tagger, but for ICollapsedRegionTag instead.  That sample's MainControl code also shows how you can access the tagger instance via the document.Properties once it's been created by the syntax language.

I hope that helps!


Actipro Software Support

The latest build of this product (v24.1.0) 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.