This is a migrated thread and some comments may be shown as answers.

Highlight words which are incorrect

3 Answers 58 Views
SpellChecker
This is a migrated thread and some comments may be shown as answers.
Todd Millett
Top achievements
Rank 1
Todd Millett asked on 15 Apr 2011, 12:45 PM
Instead of showing the Window of spell checking, is there a way in which we can highlight only the incorrect words inside the textbox, same as can be done in the RichTextBox? With RichTextBox the only problem is that we cannot prevent the user from entering multiline.

3 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 18 Apr 2011, 08:19 AM
Hello Todd Millett,

You are right that it would be great if it was possible to have the underlines in the MS controls. However, it is not possible for us to implement highlighting or underlining of incorrect words in a TextBox or a RichTextBox, as they do not provide an API for that.
On the other hand, the behavior of RadRichTextBox on pasting multi-paragraph text when AcceptsReturn = "False" has already been fixed and that will be visible once an interim build is released.

Kind regards,
Iva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Todd Millett
Top achievements
Rank 1
answered on 19 Apr 2011, 12:39 PM
Also is it possible to get suggestions for a word without calling the RadSpellChecker.Check(...) method ? Like explicitly go and check a word in the dictionary and get the suggested list of words ?
0
Andrew
Telerik team
answered on 20 Apr 2011, 08:24 AM
Hi Todd Millett,

Yes, you can do this. Use the following code to get an instance of the DocumentSpellChecker for the corresponding control.

IControlSpellChecker controlSpellchecker = ControlSpellCheckersManager.GetControlSpellChecker(typeof(TextBox));
ISpellChecker spellChecker = controlSpellchecker.SpellChecker;
DocumentSpellChecker documentSpellChecker = (DocumentSpellChecker)spellChecker;
After that, just invoke the GetSuggestions(string word) method of that instance, which returns a generic collection of type ICollection<string>.

Contact  us if you happen to have any other difficulties.

Best wishes,
Andrew
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
SpellChecker
Asked by
Todd Millett
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Todd Millett
Top achievements
Rank 1
Andrew
Telerik team
Share this question
or