Get caret position

SyntaxEditor for WPF Forum

Posted 6 years ago by Miguel A.
Version: 18.1.0672
Avatar

Hi,

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.
Avatar

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
Avatar

Hello,

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


Actipro Software Support

The latest build of this product (v24.1.3) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.