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

Glossary Item Box

  

 


Unit

OOPHilit (add U suffix for Unicode version)

 

Declaration (partial)

type

    TCustomExtHighlighter = class(TPlusHighlighter);

    TOOPHighlighter = class(TCustomExtHighlighter);

  

Description

TOOPHighlighter is a non-visual component to dynamically highlight the text of a TPlusMemo according to the Object Oriented Pascal syntax.  It also highlights assembler sections using the proper set of keywords within them.  You can set the highlighting properties of various elements and individual keywords at design time or at run time.

 

To use this component, place a TOOPHighlighter on a form or datamodule, set your TPlusMemo.Highlighter property to point to it, et voilà, Pascal keywords are turned colored, underlined, bolded, as you want.  The same is true for assembler keywords within assembler sections.

 

Key properties

  ASMHighlight A THighlightInfo object to control highlighting of assembler sections.
  CommentBrace A THighlightInfo object to control highlighting of brace delimited comments ({...}).
  CommentParAst A THighlightInfo object to control highlighting of parenthesis-asterisk delimited comments ((*...*)).
  CommentSingleLine A THighlightInfo object to control highlighting of single line comments (//...).
  Directives A THighlightInfo object to control highlighting of directives ({$...})
  KeywordsASM A THighlightInfo object to control highlighting of all asm keywords as a whole.
  KeywordsOOP A THighlightInfo object to control highlighting of all Delphi keywords as a whole.
  KeywordsOvr An object type property to control highlighting of individual keywords.
  Numbers A THighlightInfo object to control highlighting of numbers.
  Properties A THighlightInfo object to control highlighting of property declarations.
  Strings A THighlightInfo object to control highlighting of string constants ('...').
  SubHighlighter A TPlusHighighter object for further syntax highlighting, ex: urls within comments.
  Symbols A THighlightInfo object to control highlighting of symbol delimiters (parenthesis, braces, single character operators, ...).