Applies to
Declaration
property Keywords: TKeywordList;
Description
The Keywords property holds the list of keywords and their options that the TPlusMemo or TDBPlusMemo will automatically apply dynamic styling if ApplyKeywords is True. This property is available at run time and design time with read and write access. A custom property editor for keywords is furnished in the PlusMemo package.
At create time, a TPlusMemo or TDBPlusMemo automatically creates a default empty Keywords object that you can load with your keywords and their options. If you change the keyword list by assigning a value to this property, the original should be freed when it is not needed anymore to avoid a memory leak. But you must keep in mind that when a TPlusMemo is destroyed, it also destroys the TKeywordList object that its property Keywords points to. It is possible to set property Keywords to nil to avoid this automatic behavior.
After changing the Keywords content or assigning a new TKeywordList to this property, subsequent text modification will take account of the new keywords and options (if ApplyKeywords is True). If you want to reset all the dynamic keyword styling in the text that existed before the change, you should use method ReApplyKeywords.
The Keywords property can also be edited at design time. Upon double clicking on it in the Object Inspector, a dialog box will appear that enables to set the initial keywords and their attributes.
See also
Dynamic formatting in PlusMemo