Lazarus
Programming => Packages and Libraries => SynEdit => Topic started by: BubikolRamios on July 15, 2022, 03:29:55 pm
Title:
Gutter Width
Post by:
BubikolRamios
on
July 15, 2022, 03:29:55 pm
If I type foo, and execute this, on top of that, it overlaps fine, no change visible
Any logic in +2 ?
Code: Pascal
[Select]
[+]
[-]
with
synedit1
(
)
do
begin
//canvas does not have same font as synedit itself
//so make it same
Canvas
.
Font
:
=
Font
;
Canvas
.
Brush
.
Color
:
=
clNone
;
Canvas
.
TextOut
(
Gutter
.
Width
+
2
,
0
,
'foo'
)
;
end
;
Title:
Re: Gutter Width
Post by:
Martin_fr
on
July 15, 2022, 04:40:33 pm
Probably
Code: Pascal
[Select]
[+]
[-]
const
GutterTextDist
=
2
;
//Pixel
...
procedure
TCustomSynEdit
.
RecalcCharsAndLinesInWin
(
CheckCaret
:
Boolean
)
;
...
if
FLeftGutter
.
Visible
then
FPaintArea
.
Padding
[
bsLeft
]
:
=
GutterTextDist
else
FPaintArea
.
Padding
[
bsLeft
]
:
=
1
;
For all else: By painting yourself on the canvas, I guess you invite a lot of pain and trouble...
Whatever you try to do.
TinyPortal
© 2005-2018