public LogicalToVisualLocation ( Mono.TextEditor.DocumentLocation location ) : Mono.TextEditor.DocumentLocation | ||
location | Mono.TextEditor.DocumentLocation | |
return | Mono.TextEditor.DocumentLocation |
using Mono.TextEditor; // assume 'data' is a TextEditorData object TextEditorData.Location logicalLoc = new TextEditorData.Location(0, 10); TextEditorData.Location visualLoc = data.LogicalToVisualLocation(logicalLoc);In this example, we first create a logical location representing the 10th character on the first line of the text. We then call the LogicalToVisualLocation method on our TextEditorData object to convert this location to a visual location that takes into account any formatting that may affect the position of that character on the screen. The Mono.TextEditor library provides a robust set of tools for building a text editor in C# and includes many classes and methods for working with text data.
public LogicalToVisualLocation ( Mono.TextEditor.DocumentLocation location ) : Mono.TextEditor.DocumentLocation | ||
location | Mono.TextEditor.DocumentLocation | |
return | Mono.TextEditor.DocumentLocation |