Posted 20 years ago
by Boyd
-
Sr. Software Developer,
Patterson Consulting, LLC
The 'Complete' method for the IntelliPromptMemberList class is supposed to complete the current operation (which I assumed to mean that it simulates the selection of an item in the list). It appears this method only works if the IntelliPromptMemberList is visible.
I'm currently working on the Complete Word IntelliSense feature. Essentially, this feature does a lookup on the currently available IntelliPromptMemberListItems and, if one and only one item begins with the word to be completed, it performs the same operation as if the user had selected that item from the IntelliPromptMemberList. If no single match is found, the IntelliPromptMemberList is shown for the user to select the appropriate item. This basically means that I have to build the entire member list anyway even if it's never shown.
If it turns out that I have a single match and do not need to show the IntelliPromptMemberList, I would like to be able to set the 'SelectedItem' property of the IntelliPromptMemberList and then call the 'Complete' method to simulate the selection of that item from the list. Unfortunately, this doesn't seem to do anything since the list is not visible.
There is a work-around in the I can perform an UndoableInsert for the selected item, but then I have to re-invent the process of determining the before/after text and moving the caret. If the behavior of the IntelliPromptMemberList ever changes, I'll also have to remember to update the Complete Word process. It would be a lot easier if I could just call the 'Complete' method without ever showing the list.
What do you think? Is this doable?
I'm currently working on the Complete Word IntelliSense feature. Essentially, this feature does a lookup on the currently available IntelliPromptMemberListItems and, if one and only one item begins with the word to be completed, it performs the same operation as if the user had selected that item from the IntelliPromptMemberList. If no single match is found, the IntelliPromptMemberList is shown for the user to select the appropriate item. This basically means that I have to build the entire member list anyway even if it's never shown.
If it turns out that I have a single match and do not need to show the IntelliPromptMemberList, I would like to be able to set the 'SelectedItem' property of the IntelliPromptMemberList and then call the 'Complete' method to simulate the selection of that item from the list. Unfortunately, this doesn't seem to do anything since the list is not visible.
There is a work-around in the I can perform an UndoableInsert for the selected item, but then I have to re-invent the process of determining the before/after text and moving the caret. If the behavior of the IntelliPromptMemberList ever changes, I'll also have to remember to update the Complete Word process. It would be a lot easier if I could just call the 'Complete' method without ever showing the list.
What do you think? Is this doable?