Difference between revisions of "ATSynEdit EControl adapter"
From Lazarus wiki
Jump to navigationJump to search (→Intro) |
(→Intro) |
||
Line 4: | Line 4: | ||
* units from https://github.com/Alexey-T/EControl | * units from https://github.com/Alexey-T/EControl | ||
− | * unit from ATSynEdit: ATSynEdit_Adapter_EControl which contains class TATAdapterEControl. You must create object of this class and assign this object to | + | * unit from ATSynEdit: ATSynEdit_Adapter_EControl which contains class TATAdapterEControl. You must create object of this class and assign this object to editor property AdapterHilite. |
For ex, if you have editor object: | For ex, if you have editor object: | ||
Line 23: | Line 23: | ||
Ed2.AdapterHilite:= Adapter; | Ed2.AdapterHilite:= Adapter; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | =Properties= | ||
+ | |||
+ | =Syntax tree= |
Revision as of 22:45, 11 September 2015
Intro
ATSynEdit has adapter for lexers from SynWrite editor. It's EControl lexer engine. Use these:
- units from https://github.com/Alexey-T/EControl
- unit from ATSynEdit: ATSynEdit_Adapter_EControl which contains class TATAdapterEControl. You must create object of this class and assign this object to editor property AdapterHilite.
For ex, if you have editor object:
//form's OnCreate
Adapter:= TATAdapterEControl.Create(Self);
Edit1.AdapterHilite:= Adapter;
For ex, if you have 2 editor objects with the same text-source (see help topic ATSynEdit):
Adapter:= TATAdapterEControl.Create(Self);
Adapter.AddEditor(Ed1);
Adapter.AddEditor(Ed2);
Ed1.AdapterHilite:= Adapter;
Ed2.AdapterHilite:= Adapter;