SetNext Method
- Namespace
TXTextControl.Proofing
- Package
TXTextControl.asTXSpell. WinForms. SDK TXSpell.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Provides a method to set a specific incorrect or misspelled (TXTextControl.MisspelledWord) word, that should be handled next by the SpellCheckDialog. Furthermore, a complete new text or an object of type TXTextControl.TextControl can be set to the SpellCheckDialog. A new incorrect word or misspelled word (TXTextControl.IFormattedText.MisspelledWords) collection is connected and handled.
Syntax
SetNext(string)
Sets the text that should be handled next by the SpellCheckDialog.
public void SetNext(string text);Public Sub SetNext(text As String)| Parameter | Description |
|---|---|
| text | The text that should be handled next by the SpellCheckDialog. |
SetNext(IncorrectWord)
Sets the incorrect word that should be handled next by the SpellCheckDialog.
public void SetNext(IncorrectWord incorrectWord);Public Sub SetNext(incorrectWord As IncorrectWord)| Parameter | Description |
|---|---|
| incorrectWord | The object of type IncorrectWord that should be handled next by the SpellCheckDialog. It must be part of the incorrect word collection that was created by calling the SetNext method with a string parameter or connected by invoking the SpellCheckDialog with the first or second overload of the TXSpellChecker.SpellCheckDialog.Show method. |
SetNext(object)
Sets an object of type TXTextControl.TextControl that should be handled next by the SpellCheckDialog.
public void SetNext(object textControl);Public Sub SetNext(textControl As Object)| Parameter | Description |
|---|---|
| textControl | The object of type |
SetNext(object, object)
Sets an object of type TXTextConrol.MisspelledWord that should be handled next by the SpellCheckDialog.
public void SetNext(object misspelledWord, object iFormattedText);Public Sub SetNext(misspelledWord As Object, iFormattedText As Object)| Parameter | Description |
|---|---|
| misspelledWord | The object of type |
| iFormattedText | The object of type |
Examples
The following example uses Set Next in a focused Spell Check Dialog State Manager workflow. The created object is then available to the surrounding document workflow.
spellCheckDialogStateManager.SetNext("Approved", "Approved");
Console.WriteLine("Spell Check Dialog State Manager is ready for use.");spellCheckDialogStateManager.SetNext("Approved", "Approved")
Console.WriteLine("Spell Check Dialog State Manager is ready for use.")Remarks
An exception is thrown for the second overload, if the SpellCheckDialog is connected to an instance of TXTextControl.WPF.TextControl.
An exception is thrown for the fourth overload, if the SpellCheckDialog is not connected to an instance of TXTextControl.TextControl object of which TextPartCollection contains the iFormattedText parameter.