Scroll Position

SyntaxEditor for WPF Forum

Posted 14 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 14 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 14 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 14 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 (v24.1.1) 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.