How to create SpanIndicator to simulate URL link

SyntaxEditor for Windows Forms Forum

Posted 13 years ago by shark92651
I have a case where I cannot use a language file, but would like to create a SpanIndicator that will display some text as a URL link. I want the text to be blue and be underlined. My first thought was to simply create a SpanIndicator using IndicatorMarks.StyleAssignment, and then provide a HighlightingStyle that includes the underline attribute. This works, however if my link text contains spaces, the spaces are not underlined and it ends up looking like several different links.

My next attempt was to set the IndicatorMarks.Adornments, and just paint the underline myself. The problem with this approach is that it ignores the style and my text is black instead of blue. Is there a way for me to include both IndicatorMarks types?

Comments (2)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Yes, sure you can do both the HighlightingStyle assignment and the marks as well. IndicatorMarks is a flags enumeration so just OR the two options together.

Actipro Software Support

Posted 13 years ago by shark92651
Duh, of course! Brain-freeze on my part, I was attempting a logical or "||".
The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.