Applies to
TURLHighlighter component
Declaration
property Priority: Boolean;
property Scope: Integer;
Description
These properties control the scoping rules used by TUrlHighlighter. The Priority property is used to control whether finding urls should include already dynamically highlighted text. If set to True, TUrlHighlighter will include sections found from TPlusMemo.StartStopKeys and words highlighted because of TPlusMemo.Keywords for doing url searching work. The default value is False, 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 checked (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 url finding is done only inside of already dynamically highlighted text. Leave it to zero (its default value) and the checking will be done only for non-syntax-highlighted text (unless Priority is True). Set it to the particular value of a start-stop key's context number, and url parsing will be done only inside of those sections.
Usually, both Scope and Priority are kept at their default value, or only one of them is set different. However, nothing prevents using non default values for both of them, which would produce special highlighting rules when TUrlHighlighter 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.