[Lazarus] Marking columns in synedit

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Sat Oct 29 13:35:25 CEST 2011


Martin wrote:
> On 29/10/2011 11:30, Mark Morgan Lloyd wrote:
>> Is there an easy way of setting columns to a different background 
>> and/or foreground colour?
>>
>> I've got two synedits, one in a main window with "music ruled" 
>> coloured lines and a small one above it numbered for columns, provided 
>> that the fount etc. is the same the relative positioning is correct. 
>> I'd like to be able to highlight header columns to mark tab positions, 
>> it's safe to assume that all visible character positions will contain 
>> a digit or a space.
>>
> 
> 
> If you want to highlight headers (that is in the one line SynEdit) then 
> look at the position highlighter (lazarus:  examples/synedit/
> 
> If you want to highlight the same column(s) in every line, and there may 
> be any number of lines, you would have to add the highlight for *every* 
> line (lot of adding). You may rather try to modify the highlighter. ( 
> http://wiki.lazarus.freepascal.org/SynEdit_Highlighter )
> 
> You can also inherit your own SynEdit, and add multiply 
> SynMarkupSelection modules, which you can easily change to highlight 
> boundaries given by you (in your color) rather than the current selection.

Thanks Martin, now looking at the example. The header pane is typically 
only a couple of lines and is rarely updated so I don't think it's going 
to be a problem.

I'm looking at some badly-OCRed Pascal, and anything that helps keep the 
indents straight is going to be a big help.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list