[Lazarus] Is it posibble change cursor in source editor

Martin Frb lazarus at mfriebe.de
Fri Feb 6 18:21:39 CET 2015


On 06/02/2015 17:12, FreeMan wrote:
>> On 31.01.2015 21:24, Martin Frb wrote:
>>
>> It might be now, but you need to do a couple of code changes, since 
>> no options exist.
>>
>> unit:
>> components\synedit\syneditpointclasses.pas
>>
>> line 2410
>> constructor TSynEditScreenCaret.Create(AHandleOwner: TWinControl);
>>
>> change (old)
>>   FCaretPainter := 
>> TSynEditScreenCaretPainterSystem.Create(AHandleOwner);
>> into (new)
>>   FCaretPainter := 
>> TSynEditScreenCaretPainterInternal.Create(AHandleOwner);
>
> Something wrong but what is wrong :)
> I got svn version fpc & lazarus I added lines from source. I wrote 
> create code is different in your message, I told about that.
>
>
> /opt/lazarus/components/synedit/syneditpointclasses.pas
> .....
> 2644:{ TSynEditScreenCaret }
>
> constructor TSynEditScreenCaret.Create(AHandleOwner: TWinControl);
> begin
>   Create(AHandleOwner, TSynEditScreenCaretPainterSystem);
Replace this with
     Create(AHandleOwner, TSynEditScreenCaretPainterInternal);

and then

procedure TSynEditScreenCaretPainterInternal.Init;
begin
   FSavePen := TPen.Create;
   FColor := clBlack;
   inherited Init;
end;

replace clBlack with your choice





More information about the Lazarus mailing list