Pressing Enter to close Intelliprompt list

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by Karl Grambow
Version: 4.0.0233
Avatar
Hi,

When viewing an Intelliprompt list, pressing Enter closes the list, which is fine. However, on some occasions I would additionally like a carriage return to be inserted after pressing Enter. In other words, pressing enter would close the list and insert a carriage return.

I've tried to handle this in the Intelliprompt_Closing event and I can manually insert a carriage return using editor.Document.InsertText with a ModificationType of Enter. This works in that it inserts the carriage return but it doesn't move the caret (as it would when I normally press Enter to end a line). More importantly, it doesn't fire the SmartIndent event, which I'd need it to in my case.

Is there a way I can achieve what I'm trying to do? Essentially, on pressing Enter when handling an Intelliprompt list, I'd like to close the Intelliprompt list and subsequently for normal Enter key behaviour to occur.

Thanks,

Karl

Comments (2)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Karl,

Try using EditorView.ReplaceSelectedText instead. Only calls to the EditorView text replacing methods will process smart indent.


Actipro Software Support

Posted 12 years ago by Karl Grambow
Avatar
Thanks a lot, that's exactly what I was looking for.

Karl
The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.