Intellisense auto complete when pressing Enter

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 2 years ago by Gavin Huet
Version: 22.1.3
Avatar

Hi,

If I am typing and the autocomplete intellisense appears, is there a way to make the enter key do a line feed as opposed to just selecting what is in the autocomplete list?

Example, type in "Dim a As String", the autocomplete list appears, "String" is selected, so if I press enter all it does is close the autocomplete list, whereas I want it to do a line feed.

Many thanks

Gavin

Comments (1)

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

Hi Gavin,

If you make a class that inherits VBCompletionProvider and you override its OnSessionOpening method, add this line:

((CompletionSession)session).IsEnterKeyHandledOnCommit = false;

Then return the result of the base method implementation call.

Setting that property will allow Enter to insert a line feed.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.