Handling Scrolling events

SyntaxEditor for Windows Forms Forum

Posted 19 years ago by Karl Grambow
I'm handling scrolling events using ViewVerticalScroll.

I've got two editors side by side and when I scroll one I am scrolling the other.

Now, I've got this working but the editor that I'm scrolling gets stuck (for about a second) every now and then. It's not a big issue but I was wondering if perhaps I'm going about this the wrong way.

Here's the code I'm using.... Is there a better or more efficient way of doing this?

Private Sub SyntaxEditor1_ViewVerticalScroll(....)

'get position of the editor I'm scrolling
Dim Position = SyntaxEditor1.SelectedView.FirstVisibleDisplayLineIndex

'set the position of the 2nd editor to that of the first
SyntaxEditor2.SelectedView.FirstVisibleDisplayLineIndex = Position

End Sub

Comments (1)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
That looks like the correct and most efficient code.

Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.