
Hi guys,
I would like to support searching in my application much like it is in e.g. Firefox, where I start typing something in the search field and then the first possible match is highlighted. I have tried implementing this using the standard Searcher property on the ActiveView, and except for one detail, it's working well. The only problem is that once a partial match has been made and the user types in the next character, a call to FindNext() will ignore the current match, even though the added character is also a part of the first match. So, for instance, if I have the word "test" in my SyntaxEditor in four different locations, each time I type in a character of the word, it jumps through each of the "test" occurrences. I imagine that this happens because the SyntaxEditor makes a selection after FindNext() has been called, and then performs the next search at the end of this selection - what I want is simply to expand the selection to include the newly typed character, if the word is still a match, and if not, jump to the next occurrence. I might be able to pull this off using some sort of hack, but I was wondering if this can't be done pretty easily and if so, how. Hope you can help :)
[Modified at 08/29/2011 08:48 AM]
I would like to support searching in my application much like it is in e.g. Firefox, where I start typing something in the search field and then the first possible match is highlighted. I have tried implementing this using the standard Searcher property on the ActiveView, and except for one detail, it's working well. The only problem is that once a partial match has been made and the user types in the next character, a call to FindNext() will ignore the current match, even though the added character is also a part of the first match. So, for instance, if I have the word "test" in my SyntaxEditor in four different locations, each time I type in a character of the word, it jumps through each of the "test" occurrences. I imagine that this happens because the SyntaxEditor makes a selection after FindNext() has been called, and then performs the next search at the end of this selection - what I want is simply to expand the selection to include the newly typed character, if the word is still a match, and if not, jump to the next occurrence. I might be able to pull this off using some sort of hack, but I was wondering if this can't be done pretty easily and if so, how. Hope you can help :)
[Modified at 08/29/2011 08:48 AM]