Posted 6 years ago by Andy Schott
Version: 14.1.0323
Avatar

Is it possible to be notified when the user scrolls in the Syntax Editor? I tried handling the Scroll event, but it is never fired.

Comments (4)

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The WinForms SyntaxEditor currently has ViewHorizontalScroll and ViewVerticalScroll events you can watch.


Actipro Software Support

Posted 6 years ago by Andy Schott
Avatar

Thanks for the info - those events seem to do what I want. Is there any way to get the current scroll value of the syntax editor's scroll bars? I didn't see anything in the EditorView class. In the SyntaxEditor class there are VerticalScroll and HorizontalScroll properties, but their Value property always seems to be 0 (likely for the same reason that the Scroll event never fires).

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Those two properties are inherited from the WinForms framework and aren't used by us.  Each editor view has FirstVisibleX and FirstVisibleDisplayLineIndex properties, which are effectively the scroll bar values.


Actipro Software Support

Posted 6 years ago by Andy Schott
Avatar

That looks like it will work for me. Thanks!

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

Add Comment

Please log in to a validated account to post comments.