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?
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