Posted 20 years ago
by Markus

Hi folks,
I want to use squiggling lines under a word inside SyntaxEditor. (just like
VS.NET represents compiler errors).
But until now I dont have success with SpanIndicator (I am right - I need to use
this for squiggling lines??)
What I have tried:
editor.Document.Indicators.Add(New MySpanIndicator, 0, 20)
'0 means line 1?? and mark 20 charakters???
'And here my inherited SpanIndicator class - what is missing? ->No glue at the moment!
Public Class MySpanIndicator
Inherits SpanIndicator
Private backColor As Color
Private foreColor As Color
Public Sub New()
MyBase.New("test", 1, True, Nothing)
backColor = Color.AliceBlue
foreColor = Color.BlanchedAlmond
End Sub
Protected Overrides Sub DrawGlyph(ByVal g As System.Drawing.Graphics, ByVal bounds As System.Drawing.Rectangle)
End Sub
Protected Overrides Sub DrawMarks(ByVal g As System.Drawing.Graphics, ByVal bounds As System.Drawing.Rectangle)
End Sub
Protected Overrides Function GetHighlightingStyle() As ActiproSoftware.SyntaxEditor.HighlightingStyle
Return New HighlightingStyle("BreakpointStyle", "Breakpoint", foreColor, backColor, False, False, False)
End Function
End Class
So could please anyone post a simple example for
underlining let's say the first word on line 5 with a
suiggling line???
Thank you folks,
Markus
I want to use squiggling lines under a word inside SyntaxEditor. (just like
VS.NET represents compiler errors).
But until now I dont have success with SpanIndicator (I am right - I need to use
this for squiggling lines??)
What I have tried:
editor.Document.Indicators.Add(New MySpanIndicator, 0, 20)
'0 means line 1?? and mark 20 charakters???
'And here my inherited SpanIndicator class - what is missing? ->No glue at the moment!
Public Class MySpanIndicator
Inherits SpanIndicator
Private backColor As Color
Private foreColor As Color
Public Sub New()
MyBase.New("test", 1, True, Nothing)
backColor = Color.AliceBlue
foreColor = Color.BlanchedAlmond
End Sub
Protected Overrides Sub DrawGlyph(ByVal g As System.Drawing.Graphics, ByVal bounds As System.Drawing.Rectangle)
End Sub
Protected Overrides Sub DrawMarks(ByVal g As System.Drawing.Graphics, ByVal bounds As System.Drawing.Rectangle)
End Sub
Protected Overrides Function GetHighlightingStyle() As ActiproSoftware.SyntaxEditor.HighlightingStyle
Return New HighlightingStyle("BreakpointStyle", "Breakpoint", foreColor, backColor, False, False, False)
End Function
End Class
So could please anyone post a simple example for
underlining let's say the first word on line 5 with a
suiggling line???
Thank you folks,
Markus