Unit
NbHili
Declaration (partial)
type
TCustomExtHighlighter = class(TPlusHighlighter);
TNumberHighlighter = class(TCustomExtHighlighter);
Description
TNumberHighlighter is a non visual component to dynamically highlight numbers in a TPlusMemo. Numbers can be in decimal format or in hexadecimal. Hexadecimal numbers are recognized by beginning with a dollar sign ($) followed by hexadecimal digits. Floating point numbers are not supported in the current version of this component.
To use this component, place a TNumberHighlighter on a form or datamodule. Set TPlusMemo.Highlighter property to this TNunberHighlighter instance (named "NumberHighlighter1" by default). Then set the number highlighting attributes to your desire via properties enumerated below.
Key properties
Run-time only
| AltFont | A Boolean property to control if numbers use the font set by TPlusMemo.AltFont. | |
| Background | A TColor property for the number's background. | |
| ContextNum | A SmallInt property that determines the context number associated with numbers. | |
| CTypeHex | A Boolean property that controls whether C syntax hex numbers are highlighted (0xaaaa). | |
| |
Delimiters | A set of Char containing the word delimiters. |
| Foreground | A TColor property for the number's foreground | |
| Priority | A SmallInt property that affects which sections the numbers are highlighted. | |
| Scope | A SmallInt property that affects in which sections the numbers are highlighted. | |
| Separators | A string property that contains the word delimiters. | |
| Style | A TFontStyles property that controls the numbers font style. |
Key events
| OnQueryHilit | Triggered while parsing memo content, enables fine control of highlighting. |