Select Token + show/update IntelliPrompt Memberlist

SyntaxEditor for Windows Forms Forum

Posted 16 years ago by Erik Pepping - RADVenture B.V
Version: 4.0.0260

I have an editor using CsharpLanguage (add-on).

The intelliprompt memberlist appears and works correctly when the editor's
text is manually changed ( pressing ".", etc).

I have now a requirement where i need to programatically select a token and
force to show the intelliprompt list.

I've tried this:

Insert text to the document

   // Set the Caret Offset 
   syntaxEditor2.Caret.Offset = textRange.EndOffset - 1;
   // Type the "." 
   syntaxEditor2.Document.InsertText( DocumentModificationType.Typing,
    syntaxEditor2.Caret.Offset , ".");
After this syntaxEditor2.IntelliPrompt.MemberList is still empty.
therefore calling syntaxEditor2.IntelliPrompt.MemberList.Show();
shows an error that there are no items to show.

Further inspection showed that:

 void syntaxEditor2_KeyTyped(object sender, KeyTypedEventArgs e)
Fires when i type in the editor, but it's never fired if i use the InserText method.
I;ve tried many DocumentModificationType options ( DocumentModificationType.Typing, AutoComplete, etc) without the desired effect.

Am i doing something wrong ??

Comments (2)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Erik,

Try using the selected view's PerformInsertTyping instead. That should simulate typing properly.

Actipro Software Support

Posted 16 years ago by Erik Pepping - RADVenture B.V
Excellent! It works now.

The latest build of this product (v23.1.2) was released 20 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.