We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Underline at end of line

I use the underline feature to indicate syntax errors in a document, and I would like to display the underline at the end of a line (where the EOL marker would go) when the line ends with an incomplete expression.

I tried different things (like specifying a range that spans to the first column of the next line) but the underline does not show. The only way to get it is to insert a fake space at the end of the line and underline it, but then the user won't understand why extra spaces are magically inserted at the end of lines.

Another solution is to highlight the following token but the user feedback is not as good.

Any idea?

2 Replies

DU David Union November 26, 2006 11:44 PM UTC

I'm sort of in the same boat - I believe the task is to come up with some sort of regex that defines 'what an incomplete expression is', that is some combination that has or doesn't have the right stuff and ends with (in your case - mine ignores line feeds) new line... and set that lexem to your error color type (which is for example red-underlined). If the language is complex or nestable like ours it may or may not be possible.. or efficient. The other idea is just run-time keystroke code.

I've asked for 'run time highlighting of errors' samples or suggestions. I was looking at the validate sample, maybe hooking the 'ontextchanged' or 'ontextchanging' event, read the text, and mark it wrong on each line that it's wrong... possibly very slow if it's long but not sure there is any other way.

I'm still waiting to hear from syncfusion if they have any other suggestions.

>marker would go) when the line ends with an >incomplete expression.

I tried different >things (like specifying a range that spans to >the first column of the next line) but the >underline does not show. The only way to get it >is to insert a fake space at the end of the line >and underline it, but then the user won't >understand why extra spaces are magically >inserted at the end of lines.

Another >solution is to highlight the following token but >the user feedback is not as good.

Any >idea?


AD Administrator Syncfusion Team November 27, 2006 09:11 AM UTC

Hi Miguel,

Our apologies for the delayed response. It is possible to indicate syntax errors at the end of a line when the line ends with an incomplete expression using the EndBlock in the lexem. I have attached a sample that illustrates this. Let me know if this meets your requirements.

Thanks for your patience.

Regards,
Ebenezer.P

sample

Loader.
Live Chat Icon For mobile
Up arrow icon