Possible Selection bug with CompletionSession

SyntaxEditor for WPF Forum

Posted 13 years ago by Kasper
Version: 11.1.0545
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Hi guys,

I'm trying to guess which item my user wants from the completion list, based on some logic. I then use the following code to pre-select this item, if possible:

if(itemToPreSelect != null)
    completionSession.Selection = new ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.CompletionSelection(itemToPreSelect, ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.CompletionSelectionState.Full);
However, even though I have specified the Full selection state, the item is only partially selected, meaning that I have to press the first letter of the item to have it fully selected. I want it fully selected immediately, which is also what I would expect from the above code. Am I missing something? :)

Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Kasper,

By calling the Open(view) method, it will attempt to initialize the list based on the identifier, if any, that you are typing in at the time. You might try using the other overload and passing it an empty TextRange where both Start/EndOffset are the caret's offset. I'm not sure if that will work around your issue or not but it's worth a try.

Otherwise, you could probably set the selection right after the Open call instead.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.