[Lazarus] Marking columns in synedit

Martin lazarus at mfriebe.de
Sat Oct 29 14:46:00 CEST 2011


Try the attached => type some text into the edit


On 29/10/2011 12:35, Mark Morgan Lloyd wrote:
> 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.
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: synHL.rar
Type: application/octet-stream
Size: 64504 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20111029/e637f91a/attachment-0003.obj>


More information about the Lazarus mailing list