ReadOnly SpanIndicator on last line

SyntaxEditor for Windows Forms Forum

Posted 9 years ago by Gareth Hayter
I need the last line of a SyntaxEditor to be read-only. I created a read-only SpanIndicator but I can still enter text after the final character on the line ie: after the end of the SpanIndicator.

How can I ensure that it remains read-only right through to the end of the document?


Comments (2)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Gareth,

For that scenario you may need to handle the DocumentPreTextChanging event and set e.Cancel to true if at the end of the document.

Actipro Software Support

Posted 9 years ago by Gareth Hayter
Awesome - that works perfectly. Thank you.
The latest build of this product (v2018.1 build 0341) was released 9 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.