Hi,
I am using the SpellChecker to check a number of controls on a Windows Form. My code loops through the control collection and verifies that the control is a valid control to spellcheck. Then, the control is passed to the spellchecker using the ShowSpellCheckDialiog method:
spellChecker.ShowSpellCheckDialog(controlToBeChecked)
The problem I am having is the difference in behavior when the "Change All" or "Ignore All" buttons are pressed. The documentation mentions this:
Is there any way I can get "Change All" to behave the same way as the "Ignore All" in terms of scope? Change All only works on the current document (or control), whereas Ignore All works on the current instance (or lifespan) of the control.
Thanks!
Thanks. I was able to use this as the base for my solution.
Hi Oyvind,
OK, I do see the issue, and unfortunately it is not built into the UltraSpellChecker to handle that scenario directly. There are several workarounds viable, you can implement your own SpellCheckerDialog that inherits from SpellCheckerDialogBase, and on the SpellCheckDialogOpening replace the dialog with your own. You should instead be able to on the SpellCheckDialogOpening access the exist SpellCheckForm, and hook into the ChangeAll button event, from there you could either loop through the controls or just add the values to a local dictionary, which before you proceed to the next control loop through the values in the dictionary and replace the exist text, then call the spellcheck. void spellChecker_SpellCheckDialogOpening(object sender, SpellCheckDialogOpeningEventArgs e){ UltraButton btnChangeAll = e.SpellCheckDialog.Controls.Find("btChangeAll", true).First() as UltraButton; btnChangeAll.Click += btnChangeAll_Click;}void spellChecker_SpellCheckDialogClosed(object sender, SpellCheckDialogClosedEventArgs e){ UltraButton btnChangeAll = e.SpellCheckDialog.Controls.Find("btChangeAll", true).First() as UltraButton; btnChangeAll.Click -= btnChangeAll_Click;}You can also submit your feature idea and track it's progress on product ideas page here : http://ideas.infragistics.com/Hope this helps,
Hello Michael-
Apologize for the confusion. It might be better illustrated with an example. I will try to upload an example project.
To understand my question, run the project and click the "Spell Check" button.
The spell checker will catch the miss typed word "Heello" and suggest the word "Hello". Clicking the "Ignore All" button on the spellcheck dialog will ignore all other occurrences of "Heello". However, if you run the project again, but this time click "Change All", the spellchecker only corrects the first occurrence of "Heello", but does not correct the same word in other controls.
To me, this seems confusing since the word "All" on the spellchecker's button controls seems to have different meanings...
I just want to clarify what you mean by the scope here. I get several interpretations of scope from what you wrote each significantly different. Do you want it to update every control's instance of the word, not just the current word? Do you want it to auto-update future instances of the word? If this is the case, when would you expect to do it? Only when the spell checker is opened, or after the word is typed?
Or is it something else?Michael GermannSenior Software DeveloperInfragistics