Display an error message

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by ori
Version: 4.0.0257
Avatar
Hello,

I'm using the SyntaxEditor in order to edit code section and I want the code to be valid. If the code does not compile I want to show an error to the user.

I want to check the code in the Validating event and if there is an error show it to the user and prevent him from the leaving the field (unless he wants to revert to the old value)

Is there a nice way to display the compilation error (inside the component and not a message box)?

Thanks.

Comments (3)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry but no, you'd have to display errors the same way you would do with any normal TextBox like control.


Actipro Software Support

Posted 12 years ago by ori
Avatar
OK, one more question about errors. Lets say the user doesn't want to correct the error, instaed he wants to undo his changes. Is there a way do revert to the editor's text from before the user entered the editor?
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Well SyntaxEditor tracks multiple undo/redo levels so perhaps you could undo back to a point. But I'm not sure how you would identify that point. You might be better off saving the text at when the control is entered and using that as needed.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.