문제

I'm relatively new on Delphi, but after installed SynEdit componnent, I can't create my own highlighter yet. I already generated the .pas with mine highlighting configs. I tried from all the ways I know. But I can't use the generated file to highlight. Can anyone help me?

I thank in advance...

도움이 되었습니까?

해결책

Well, people. I already solved my problem. Actually it was so simple. To use the generated .PAS, just include it in the project and assign in the USES statemments. After that, you need to assign the custom highlighter to a SynComponent in RunTime. Like this:

var
   HL : TSynSampleSyn;
begin
   HL := TSynSampleSyn.Create(Self);
   SynEdit1.Highlighter := HL;
end;

After execute this block, the SynEdit will be ready for use.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top