[Lazarus] RE : Displaying text with colour and insertion point

Bernd prof7bit at googlemail.com
Fri May 18 11:16:56 CEST 2012


2012/5/18 Graeme Geldenhuys <graemeg.lists at gmail.com>:

for simulating a terminal with SynEdit you might also find this helpful:
https://github.com/prof7bit/HaskellTool/tree/master/src

in console.pas there is a TConsole that you just create and give it a
reference to the synedit. It currently has the ghci executable
hardcoded into it but this could also be a shell or some other
interactive command interpreter. In main.pas I just create an instance
of it and pass a reference to the right hand side synedit to it and
then it takes full control over this synedit and works pretty much on
its own.

This does NOT solve the coloring problem (the highlighter that is also
contained in these sources is attached only to the edits on the left
side and is a conventional very simple highlighter for haskell
syntax).

What it does do is demonstrating that simulating an interactive
command prompt with TSynEdit is not so difficult at all.




More information about the Lazarus mailing list