TPMLiveSpell3 component
PlusMemo Help Send comments on this topic.
TPMLiveSpell3 component

Glossary Item Box


Unit

PMLiveSpell3

 

Declaration (partial)

type

    TCustomExtHighlighter = class(TPlusHighlighter);

    TPMLiveSpell3 = class(TCustomExtHighlighter);

 

Description

TPMLiveSpell3 is a highligher component to dynamically spell check the text content of a TPlusMemo, using Addict3 product.  It shows misspelled words with a wavy underline whose color you control with TPlusMemo.SpecUnderline property.  It comes with red as default.  Text is spell checked as it is entered.  When composing a word with the keyboard, the current word will be checked only when it is finished (entering a delimiter) or moving the caret out of it.

 

Upon right-clicking on a misspelled word, a popup menu will appear, showing suggestions as replacement for the bad word.  You can also have live correct functionality by turning on soLiveCorrect in Addict options property.

 

To use this component, place a TPMLiveSpell3 and a TAddictSpell3 on your form (TAddictSpell3 is the spell check component from Addict3), set TPMLiveSpell3.Speller property equal to this TAddictSpell3 component, and your TPlusMemo.Highlighter to the TPMLiveSpell3 component.  Voilà, bad words are underlined with a wavy line.

 

You can still have syntax highlighting with highlighter components by setting TPMLiveSpell3.SubHighlighter equal to those components.

 

The TPMLiveSpell3 component does not help to do a normal dialog spell operation.  For that, you have to use a TPlusMemoControlParser object, that you will find in file ad3PlusMemoParser.pas.

 

This component is not included in ready made packages from Electro-Concept Mauricie.  To have it available on your component palette, add file PMLiveSpell3.pas to a package of your choice.  We recommend against using the PlusMemo package, otherwise you will have to add this component every time you update your package.

 

Note that this component does not apply highlighting at design time.

 

Key properties

Run-time only

  ContextNum The context number associated with words flagged as mispelled words.
  Active A Boolean property to control if the component is active or at rest.
  ParsingEngine A reference to the internal Addict parsing object, useful to achieve special effects.
  Priority An Integer property that decides if highlighting from this component takes priority over that from other ones.
  Scope An Integer property that controls which sections of the content are spell checked.
  Speller A reference to the TAddictSpell3 component used to do the spell check work.  Properties of this component are crucial to the correct operation of TPMLiveSpell3!.
  SubHighlighter A reference to another TPlusHighlighter to further apply dynamic highlighting.