Problem

CompletionItem not shown if autoCompletePreText is different from text

Posted 2 years ago by Avatar Matt Yaeger

I have the following two CompletionItems that are added to a CompletionSession when the letter 'f' is typed but  only one item is shown (the one that the text and pretext match is shown).  If I press backspace to clear the 'f' (but session is still open) then both items are visible.  Is this expected?  If so, how do I get both completion items to be displayed initially?  Also, the match options set on the session are IsCaseSensitive and UseAcronyms.  No filters are enabled.

 

CompletionItem("foobar", imageProvider, new DirectContentProvider("desc"), "foobar", null)

CompletionItem("foobar2", imageProvider, new DirectContentProvider("desc"), "baz", null)

 

Thanks,

 

Matt Yaeger


Comments (2)

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

Hi Matt,

It sounds like you have the CanFilterUnmatchedItems feature on your session.  That will shrink the list down to only the things that match what is being typed.  There is info on that in the documentation.

Also matches by default work against the pre-text.  If you want it to match based on the displayed text instead, you'd want to set the CompletionMatchOptions.TargetsDisplayText option.


Actipro Software Support
Posted 2 years ago by Matt Yaeger

Achh, that's my fault. I missed the CompletionMatchOptions.TargetsDisplayText option.  Thanks.

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

Add a Comment

Please log in to a validated account to post comments.