[Lazarus] Displaying text with colour and insertion point
lazarus at mfriebe.de
Wed May 16 13:13:11 CEST 2012
On 16/05/2012 09:13, Mark Morgan Lloyd wrote:
> Does anybody have any suggestions for a component to display status or
> terminal text that will allow limited enhancement (colour, possibly
> underline etc.)?
> Over the last few weeks I've been tinkering with an emulator for an
> obsolete mechanical terminal (IBM 2741), including support for the APL
> character set. I started off using a listbox for simple output, noting
> that this didn't have provision for multiple colours or marking the
> insertion point. I moved on to stuffing characters into a memo, this
> allowed me to force a current-position marker but still had no colour.
> Looking at the CmdLine component, it appears OK as a command window
> (i.e. accepting keyboard input etc.) but isn't so hot when the
> principal requirement is to display text pushed into the underlying
> strings storage from elsewhere: in particular, there isn't a way to
> force the insertion point marker to the end of what's just been output.
> I'm sure I'm not the only person who wants to do this sort of thing:
> does anybody have any recommendations?
TSynEdit? TSynPosSyn (position highlighter, see examples)
You can remove all the SynEdit.Keystrokes. And also set it to not react
to mouse, if required (use MouseActions and make them empty)
You can also set the caret shape, to be a block (full char width).
If you want to loose ballast, you can remove various of the "Markup"
More information about the Lazarus