Implementing Go To Line

SyntaxEditor for WPF Forum

Posted 15 years ago by Jose Simas
Version: 9.1.0505
Avatar
Hi,

Apologies if this is a very basic question but how do I bring a line into view using its line number?

I am implementing something similar to Visual Studio's Go To Line where I input a line number and the Syntax Editor brings that line into view.

Regards,
Jose

Comments (2)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Jose,

You can set the editor.ActiveView.FirstVisiblePosition property to new TextPosition(5, 0) if you wanted to bring the sixth document line to the top.

The IEditorView.VisibleViewLines collection property has a FullyVisibleCount property off of it that tells you how many fully visible lines are in the view. Thus you can use that to help center the target line if you wish.


Actipro Software Support

Posted 15 years ago by Jose Simas
Avatar
Thanks for that, problem solved.

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

Add Comment

Please log in to a validated account to post comments.