question about SquiggleLineIndicator [RESOLVED]

SyntaxEditor for Windows Forms Forum

Posted 13 years ago by Dong JIA
Avatar
Hi all,
I met a problem with SquiggleLineIndicator. Please help me.
The code looks like:
SquiggleLineIndicator ^indicator = gcnew SquiggleLineIndicator(gcnew String("ErrorIndicator"), 1, Color::Red);
Token ^token = tb->Document->Tokens->GetTokenAtOffset(tb->Document->PositionToOffset(
*gcnew Position(lineNum -1, colNum-1)));
tb->Document->Indicators->Add(indicator, token->StartOffset, token->Length);
The PROBLEM is:
When token is single character, the indicator is missing. :(

Then I changed code to:
tb->Document->Indicators->Add(indicator, token->StartOffset, token->Length + 1);
In most times, it works well. But when token is on the end of line, it will raise an error(out of scope).

Could anybody please tell me why or give me a workaround?
Any suggestions are welcome.

The REASON is: the font I choice is too thin to see the the SquiggleLine. After I changed the font, everything is OK now.
Sorry for any inconvenience.

Best regards,
Dong

[Modified at 05/21/2006 09:41 PM]

[Modified at 05/21/2006 09:43 PM]
The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after this thread was created.

Add Comment

Please log in to a validated account to post comments.