Back to Devexpress

How to Add Dictionaries in Code

vcl-169006-expressspellchecker-task-based-help-how-to-add-dictionaries-in-code.md

latest712 B
Original Source

How to Add Dictionaries in Code

  • Dec 28, 2020

The following example demonstrates how to add dictionaries to the spell checker programmatically:

delphi
// ...
uses
  dxISpellDecompressor;
// ...
var
  ADictionaryItem: TdxSpellCheckerDictionaryItem;
begin
  ADictionaryItem := SpellChecker.DictionaryItems.Add;
  ADictionaryItem.DictionaryTypeClass := TdxISpellDictionary;
  TdxISpellDictionary(ADictionaryItem.DictionaryType).DictionaryPath := '..\data\american.xlg';
  TdxISpellDictionary(ADictionaryItem.DictionaryType).GrammarPath := '..\data\english.aff';
  SpellChecker.LoadDictionaries;
end;

See Also

Task-Based Help