[Lazarus] Column ruler above a synedit

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Tue Feb 10 21:19:13 CET 2015


Martin Frb wrote:
> On 10/02/2015 19:12, Mark Morgan Lloyd wrote:
>> Is there a preferred way of putting a column ruler above the text in a 
>> synedit, either (two lines) marking columns or (one line) marking tab 
>> positions?
>>
>> I've previously done this for a file viewer oriented towards large 
>> files with columnar text (e.g. database query output) by having two 
>> synedits on the same form, but since the ruler doesn't really want 
>> line numbers keeping the two lined up was not entirely reliable.
>>
> 
> Look at  ide/SourceSynEditor.pp
> 
> constructor TIDESynEditor.Create(AOwner: TComponent);
> ....
>   FPaintArea := TSourceLazSynSurfaceManager.Create(Self, FPaintArea);
> 
> It wraps the original paint area object, and reduces its size, then 
> placing a new paintarea for its own purpose on top.
> 
> In this example the size is variable. For your case it would be fixed, 
> so it should be easier.

Thanks Martin, I'll investigate.

-- 
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