Subject Re: [IBO] Questions about IncSearching
Author Helen Borrie
At 05:19 PM 14/07/2003 +0200, you wrote:

> >I'm reaching for things here, but maybe you need to call IncSearchKey
> >rather than IncSearchString, if you are passing only a single character to
> >the search. You can pass a Boolean Timeout argument to IncSearchKey. I
> >don't know if this is relevant to your case, because I can't tell from your
> >description whether each character-buttonclick is intended to create a
> >self-contained search argument or whether your code is designed to add a
> >character to the search argument on each character-buttonclick.
> >
> >Helen
>
>Ok, IncSearchKey seems to work great. Thanks.
>
>What I wanted to do is a self contained search.
>Press button with caption C and go to the first record that starts with C.
>Press button with caption M and go to the first record that starts with M.
>
>Is there any better way to do this?

If it's working, then probably not. If you think about it for a minute, a
single-character search key can't be "incremental", can it? Incremental
search is where each character added to the search string takes you
"closer" to the exact row you want.

Type "M" takes you to first row where key starts with "M"
Type "Ma" takes you to first row where key starts with "Ma" (e.g. Manson)
Type "Mau" takes you..................."Mau" (e.g. Mauskopf)
Type "Maut" takes you....

Helen

If you have only a single character, you can't get closer than the first
character...