Applies to
TNumberHighlighter component
Declaration
property Priority: Smallint;
property Scope;
Description
These properties control the scoping rules used by TNumberHighlighter. The Priority property is used to control whether number highlighting should include already dynamically highlighted text. If it is greater than zero, TNumberHighlighter will include sections found from TPlusMemo.StartStopKeys and words highlighted because of TPlusMemo.Keywords for doing its number searching work. The default value is 0, which means already highlighted sections are skipped. Only parts that are not inside a start-stop section or that is already a keyword will be searched (except if their context value correspond to Scope, as per below). This is the most typical setting.
The Scope property is used to control whether number searching is done only inside of already dynamically highlighted text. Leave it to zero and the number searching will be done only for non-syntax-highlighted text (unless Priority is greater than zero). Set it to the particular value of a start-stop key's context number, and number searching will be done only inside of those sections.
Usually, both Scope and Priority are kept at zero, or only one of them is set different. However, nothing prevents using non zero values for both of them, which would produce special highlighting rules when TNumberHighlighter is used along with other highlighters.
If you change these property at run time, call TPlusMemo.ReApplyKeywords for the change to take effect immediately. Otherwise, only subsequent editing operations will take account of the new Scope and Priority values.