TXTextControl.Proofing.SpellingCorrectionUIProvider.StateManager.SetCurrent Method

Sets an object of type TXTextControl.TextControl or text for user interface based spelling correction. Furthermore, overloads of the method determine and set a specific incorrect or misspelled (TXTextControl.MisspelledWord) word based on a specific text position to handle it by the SpellingCorrectionUIProvider.

SetCurrent(Object)

Sets an object of type TXTextControl.TextControl as CurrentTextControl to handle it by the SpellingCorrectionUIProvider. If the parameter is not null, the first TXTextControl.MisspelledWord of the TextControl is set as CurrentWordToCorrect and the corresponding TXTextControl.IFormattedText object as CurrentIFormattedText. Otherwise the SpellingCorrectionUIProvider's mode is reset to InitialState. If the TXTextControl.TextControl parameter does not contain misspelled words, the mode is set to NoWordsToCorrectFound.

[C#]
public void SetCurrent(object textControl);
[Visual Basic]
Public Sub SetCurrent(textControl As Object)
Parameter Description
textControl

The object of type TXTextControl.TextControl that is handled by the SpellingCorrectionUIProvider.

SetCurrent(String)

Sets the text that is handled by the SpellingCorrectionUIProvider as current text. If the parameter is not null, the first incorrect word of the text is set as CurrentWordToCorrect. Otherwise the SpellingCorrectionUIProvider's mode is reset to InitialState. If the text parameter does not contain incorrect words, the mode is set to NoWordsToCorrectFound.

[C#]
public void SetCurrent(string text);
[Visual Basic]
Public Sub SetCurrent(text As String)
Parameter Description
text

The text that is handled by the SpellingCorrectionUIProvider.

Return Value

SetCurrent methods including a textPosition parameter return true if the corresponding CurrentWordToCorrect property is changed on calling this method. Otherwise false.

Remarks

Throws an exception if the IsOptionsSettings property is set to true.