PDA

View Full Version : Spelling suggester



Quinn
09-14-2006, 06:12 AM
Hello all,
Can someone point me to, or give me an idea of how,
to write code for a spelling suggester? I have a dictionary
of approximately 1000 scientific terms, I would like it so that when
the user starts to type in a textbox the first letter of the word they are looking for, all the words that begin with that letter are suggested in a drop box, then when they type in the second letter, all
the words that start with the first two letters are suggested, etc...
I hope this makes sense.
Quinn

TonyJollans
09-14-2006, 08:20 AM
Have you tried using a combobox instead of a textbox?

Quinn
09-14-2006, 11:24 AM
Tony,
Does the Combobox have a method for spelling suggestion?
Otherwise I would not want to have the user scroll through all
the possible terms in a Combobox. For example, they would already have in mind that the term they are looking for starts with "PAR" but not the next letter.
If they had to scroll through all of the terms starting with the A's then I might as well print off a list of all terms. Instead, I would like if they would type in P..A..R..
and then the list would have only several to choose from....
Thanks for your help...
Quinn

fumei
09-14-2006, 08:34 PM
No, a Combobox does not have a spelling suggester. What Tony is suggesting - I think - is that a Combobox has a MatchEntry property. As each character is typed into the combobox, the control searches for an entry matching all characters entered.

I would think this would not be practical if you have 1000 entries.

I can think how this could technically be possible, but I sure can not think of a way that would be efficient.

Quinn
09-15-2006, 05:09 AM
Fumei (and Tony)
Thanks for the clarification! I will try using the Combobox and play around with its MatchEntry property. Otherwise, I'll try writing code using some substring functions. The words in my list are medical terms, and most are from the old mainframe days where they had to be abbreviated to fit the eight character limit. So, they are are not very intuitive to remember, hence the spelling suggester. Again, thanks for your help.
Quinn

TonyJollans
09-15-2006, 01:01 PM
I have used comboboxes (in userforms in Excel) with over 2000 entries and they have worked well - the entries do have to be in order, of course, but that shouldn't be a problem with a fixed list of terms.