Scroll Position

SyntaxEditor for WPF Forum

Posted 9 years ago by Gustavo Guerra
Version: 10.1.0520
Avatar
Hi,

Is it possible to get the current Horizontal and Verticall scroll offsets, so I can store them and later on restore them to the exact same positions?

Best Regards,
Gustavo Guerra

Comments (3)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Gustavo,

Yes the IEditorView interface has FirstVisiblePosition and FirstVisibleX properties you can use to save and restore the scroll positions.


Actipro Software Support

Posted 9 years ago by Gustavo Guerra
Avatar
I can calculate the different between the vertical position i'm in and the one I want and then call ScrollVerticallyByLine, but there's no equivalent for horizontal scroll. Is the only way to call ScrollRight and ScrollLeft repeatedly until i'm at the required point?

Best Regards,
Gustavo Guerra
Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Just set the IEditorView.FirstVisibleX property to whatever you need.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) 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.