Страница 1 из 1

How to use tsyntaxpainter

СообщениеДобавлено: 06.04.2021 10:34:01
Roland
Hello!

I try to make a simple example for the tsyntaxedit component. I would like to load and display a Pascal source file with syntax colouring. I don't find how to do. Would someone know?

I attach my project.

Regards.

Roland

Re: How to use tsyntaxpainter

СообщениеДобавлено: 10.04.2021 13:50:36
Roland
Fred provided to me a working example (link).

I attached here a simplified version (1). I am not sure that it is 100% correct, but as I said it works.

Regards.

Roland

(1) It doesn't work well for dark themes, because the background stays white.

Re: How to use tsyntaxpainter

СообщениеДобавлено: 10.04.2021 17:43:07
debi12345
I would like to load and display a Pascal source file with syntax colouring.

Martin postponed implementing per-character RTF text in MSEgui because considered it as boring routine which can wait.
May be someday someone will implement this important (for web browsers, advanced text editors etc) feature set.

Re: How to use tsyntaxpainter

СообщениеДобавлено: 10.04.2021 23:39:27
Roland
debi12345 писал(а):Martin postponed implementing per-character RTF text in MSEgui because considered it as boring routine which can wait.
May be someday someone will implement this important (for web browsers, advanced text editors etc) feature set.


It would be great indeed.