Question

Scroll Event

Posted 1 month 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.

Information The latest build of this product (2018.1 build 0340) was released 5 months ago, which was before this thread was created.

Comments (4)

Posted 1 month 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 1 month 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 1 month 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 1 month ago by Andy Schott

That looks like it will work for me. Thanks!


Add a Comment

Please log in to a validated account to post comments.