using Mono.TextEditor; // create a new text editor data object var editorData = new TextEditorData(); // set some text in the editor document editorData.Document.Text = "Hello, world!"; // set the caret position to be past the end of the document editorData.SetCaretTo(editorData.Document.Length); // ensure that the caret is within the bounds of the document editorData.EnsureCaretIsNotVirtual();In this example, we create a new TextEditorData object, set some text in the editor document, and then set the caret position to be past the end of the document. We then call the EnsureCaretIsNotVirtual method to ensure that the caret position is within the bounds of the document. The Mono.TextEditor library provides a text editor component for use in GTK# applications.
public EnsureCaretIsNotVirtual ( ) : int | ||
return | int |