Question

Scroll Event

Posted 3 months ago by Avatar Andy Schott

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)

Posted 3 months ago by Actipro Software Support - Cleveland, OH, USA

Hello,

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


Actipro Software Support
Posted 3 months ago by Andy Schott

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 3 months ago by Actipro Software Support - Cleveland, OH, USA

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 3 months ago by Andy Schott

That looks like it will work for me. Thanks!

Information The latest build of this product (2018.1 build 0341) was released 5 days ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.