Skip to main content

TdxCustomSpellChecker.AddWordToUserDictionary(string) Method

Adds a word to a user-defined dictionary.

Declaration

procedure AddWordToUserDictionary(const AWord: string);

Parameters

Name Type
AWord string

Remarks

The AddWordToUserDictionary method finds the first instance of a user-defined dictionary in the spell checker’s ActiveDictionaries collection (see the FindFirstEnabledUserDictionary method), and calls the dictionary’s AddWord method.

The call dispatching is dependent upon the OnAddWord event handler implementation. If a handler is assigned, and the event’s AHandled parameter is set to True, the default word appending routine is not executed.

Since the AddWordToUserDictionary method raises the OnAddWord event, don’t use this method within the event handler to prevent an infinite loop. Instead, use the dictionary’s AddWord method.

AWord specifies the word to be added to the dictionary.

If you need to use a user-defined dictionary other than the first dictionary in the collection, use the UserDictionaries property.

See Also