Overriding standard selection behavior

SyntaxEditor for Windows Forms Forum

Posted 7 years ago by Anton Timofeev
Version: 12.1.0302
Avatar

I'm working on a feature that navigates in the document when a token is clicked while the Control key is pressed. To do this I handle the MouseClick event and check whether Control is down. This works but there are several issues:

1. MouseDown event highlights the word if Control is pressed. I want to get rid of this behavior.

2. If the whole word is selected then MouseClick does not trigger. I guess it starts the drag-drop mode. I want to prevent this when Cotnrol is pressed as well.

Any ideas about how this can be done?

Comments (2)

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

Hi Anton,

You can probably handle the SyntaxEditor.ViewMouseDown event.  If you set e.Cancel to true there, it will prevent our behavior.  That is the proper mouse handler to add your code as well.


Actipro Software Support

Posted 7 years ago by Anton Timofeev
Avatar

Thanks, this works.

The latest build of this product (v2020.1 build 0400) was released 7 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.