Get caret position

SyntaxEditor for WPF Forum

Posted 6 years ago by Miguel A.
Version: 18.1.0672


I would like to show a popup below caret position. For this I would need to get the actual position within the application. How can I do that?

Comments (2)

Answer - Posted 6 years ago by Miguel A.

I've already figured it out. In case someone else looks for this, here is my solution:


var rect = editor.ActiveView.TransformFromTextArea(editor.ActiveView.CurrentViewLine.GetCharacterBounds(editor.ActiveView.Selection.EndOffset).Rect);
Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA


You can call also call the editor.ActiveView.GetCharacterBounds() method to get that.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.