[Lazarus] Column ruler above a synedit

Martin Frb lazarus at mfriebe.de
Tue Feb 10 20:22:44 CET 2015


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.








More information about the Lazarus mailing list