
Hi,
I would like to display a protokoll with different line colors.
How can I set the forecolor from a line with given linenr?
I have testet it with different Adorners but I can't find a solution.
Can you help me with a example?
regards
Frank
Hi,
I would like to display a protokoll with different line colors.
How can I set the forecolor from a line with given linenr?
I have testet it with different Adorners but I can't find a solution.
Can you help me with a example?
regards
Frank
Hi Frank,
You'd need to apply a classification type tag over the line's range and have a highlighting style associated with that classification type. One way you could do this is to use a custom indicator. See the "Indicators - Custom" QuickStart for an example. By altering the HighlightingStyle that is registered for the classification type, you could choose to just change the foreground color. Also, methods like "editor.Document.IndicatorManager.Add" have overloads where you pass in an ITextSnapshotLine and the indicator will track one particular line. You can get lines via editor.Document.CurrentSnapshot.Lines[lineno].
Please log in to a validated account to post comments.