[For a how-to with RapidSpellAsYouType, using it's IsInIgnorePos method, please see http://keyoti.com/kb/Default.aspx?ToDo=view&questId=114&catId=44]
1. add the following class
class CustomRapidSpellChecker : Keyoti.RapidSpell.RapidSpellChecker{ public int CheckRegionStart, CheckRegionEnd; public override Keyoti.RapidSpell.BadWord NextBadWord() { Keyoti.RapidSpell.BadWord bw = base.NextBadWord(); if (bw == null) return null; else { if (wordStart >= CheckRegionStart && wordEnd <= CheckRegionEnd) return bw; else return NextBadWord(); } }}
class
{
Keyoti.RapidSpell.
}
2. Then use this class before starting the dialog checker,
CustomRapidSpellChecker
rapidSpellDialog1.CheckerEngine = checker;
checker.CheckRegionStart = 5;
checker.CheckRegionEnd = 10;
theTextBox.SelectionStart = 0;
rapidSpellDialog1.Check();
In this example we only check text from char positions 5 to 10. It is of course possible to have multiple regions to ignore, this can be done by modifying the NextBadWord override.
Setting the selection start to 0 is important since wordStart and wordEnd are relative to the cursor position when the checker is started.