How to get the text and font in the Indicator DrawMarks

SyntaxEditor for Windows Forms Forum

Posted 19 years ago by shark92651
Avatar
I'm sure I am just overlooking something obvious here but I want a very simple SpanIndicator that will draw a box around some text, fill the background color, and then draw the text. I cannot find a way to get a reference to the Font property of the SyntaxEditor.

Here is how I am getting the text (is this the best way?):

protected override void DrawMarks(Graphics g, Rectangle Bounds)
{
string text = this.Document.Text.Substring(this.Offset, this.Length);
...

Comments (1)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We draw the text for you. You just override the GetHighlightingStyle and return a HighlightingStyle that gives the fore and background colors of the text. Then in DrawMarks, draw the box around the bounds.


Actipro Software Support

The latest build of this product (v24.1.1) was released 29 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.