TXTextControl.SpellCheckText Event

Occurs, if the document's text has been altered and the spelling of the new text must be checked. This event occurs only, if the EnableSpellChecking property has been set to true.

Introduced: 16.0.


SpellCheckText(Text, MisspelledWordPositions)
Parameter Description

Is the text to check.


Is an array of Long values which can be used to inform the TextControl about misspelled words. This array must be created in the event handler after the specified text has been examined. The array must contain two entries for each misspelled word: a start position and an end position. Both values must be one-based indices in the specified text. The example text 'This iss an exxample' contains two misspelled words: 'iss' and 'exxample'. For this example an array of four Long values must be created containing the values 6, 8, 13, 20. TextControl uses these positions to underline the misspelled words with a red zigzag line.

Data Types

Text: String
MisspelledWordPositions: Array of Long

See Also