Tammy,
You would have to do a number of things. First, you would have to
establish the threshold that you would wait before you determined that the
person has stopped typing. Basically, you want to say "if a keyclick comes
.1 seconds or more after the last, then it is not part of the same word".
Once you determine that value, once you detect the first keypress, you
would append the character to the end of a string that you have stored.
Then, you would find the item in the list that most closely resembles that
string. You also need to keep a timestamp of the last time a key was
pressed.
When the event handler for the next keypress is fired, you need to check
the current timestamp against the old timestamp. If it is over your
previously defined threshold, then clear your search buffer. Then, append
the character to the end of the buffer (which might now be cleared), and
begin your search again.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Tammy said:
Hi,
Can anyone tell me how to implement the following:
I have a dropdownlist containing:
abcde
alpha
amino
When a user clicks on the dropdownlist and types "ami", I want it to
go to amino. Currently, you can only type in a.
Thanks for any help.