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

Spell Check in RadRichTextBox

1 Answer 150 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lakshmi
Top achievements
Rank 1
Lakshmi asked on 01 Aug 2012, 03:15 PM

Hi Team Telerik,

My Code to list spell Check Suggestions in the Context Menu upon right clicking on the wrongly added text in the RichTextBox is n't working any more.
Actually what I did is :-

1. Enabled Richtextbox spell check property.
2) Enabled Richtextbox ContextMenu Enabled Property
3) Read * .tdf file as stream and load dictionary directly from the tdf stream

                               Private Sub LoadDictionary(ByVal tdfFileStream As Stream)

                                              Dim dictionary As New RadDictionary()

                                              dictionary.Load(tdfFileStream)

CType(Me.radRichTextBox.SpellChecker, DocumentSpellChecker).AddDictionary(dictionary, CultureInfo.CurrentCulture)

                               End Sub

RadRichtextBox property IsContextMenuEnabled is set to True ,but it is not working.

Is there any property to show
spell Check Suggestions apart from customizing the Context menu ?
Will it show the spell Check Suggestions in the Context Menu by adding the Reference to
Telerik.Windows.Documents.Proofing.Dictionaries.En-US.dll assembly by default ?

Does anyone have any suggestions why this may be?

Thank you for your time,

Lakshmi

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 06 Aug 2012, 01:19 PM
Hi Lakshmi,

The code you have included in your snippet should be sufficient to enable spell-checking using another dictionary. The recommended approach is to associate the dictionary with the culture that it is for and set the SpellCheckingCulture property of the spell checker to the same culture info. Nonetheless, your code should work too.

When it comes to the Telerik.Windows.Documents.Proofing.Dictionaries.En-US, this is the default dictionary, which RadRichTextBox associates with the InvariantCulture. If you have added a reference to this dll, the editor will load it and will use it by default.

You can refer to this article for a cause and solution of why the dictionaries may not be successfully loaded. If the dictionaries are loaded, the suggestions must be visible in the ContextMenu. Customizing the menu will not help though, if there are not any close suggestions for the misspelled words.

I hope this answers your question.

Regards,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
General Discussions
Asked by
Lakshmi
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or