ReadOnly SpanIndicator on last line

SyntaxEditor for Windows Forms Forum

Posted 14 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 14 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 14 years ago by Gareth Hayter
Awesome - that works perfectly. Thank you.
The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.