Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TAdvMemo
How to create own Syntax Highlighters with customer specified keywords

As TAdvMemo is a syntax highlighting memo control, this means that the colors of text are defined by syntax rules. If you want to change the color of a specific text in the memo, the only possibility to do this is to define this as a syntax rule.

You can write a custom syntax styler. This is a component that descends from TAdvCustomMemoStyler and defines all syntax rules to control the syntax highlighting in the memo. All included styler components are based on this.

As an example, you can download the TAdvPascalMemoStyler (ADVMPS.PAS), which is the styler used to set the colors for the Pascal language. If you want to set your own rules for applying color to text in the memo, you'd need to create a similar styler component as TAdvPascalMemoStyler and assign your own styler control to AdvMemo.SyntaxStyles.