Lazarus
Programming => Packages and Libraries => FPSpreadsheet => Topic started by: Jvan on October 01, 2020, 02:21:13 am
Title:
Background Color for a Range?
Post by:
Jvan
on
October 01, 2020, 02:21:13 am
I'm using de the following code:
Code: Pascal
[Select]
[+]
[-]
for
i
:
=
0
to
10
do
WriteBackgroundColor
(
0
,
i
,
RGBToColor
(
235
,
235
,
235
)
)
;
for
i
:
=
0
to
10
do
WriteBackgroundColor
(
1
,
i
,
RGBToColor
(
235
,
235
,
235
)
)
;
But maybe there is a way for a range.
Title:
Re: Background Color for a Range?
Post by:
winni
on
October 01, 2020, 01:25:14 pm
Hi!
Tell us what
WriteBackgroundColor
does.
Setting a pixel? If yes then just do:
Code: Pascal
[Select]
[+]
[-]
....
With
Canvas
do
begin
Brush
.
color
:
=
RGBToColor
(
235
,
235
,
235
)
;
Pen
.
Color
:
=
Brush
.
Color
;
Rectangle
(
0
,
0
,
2
,
11
)
;
end
;
Winni
Title:
Re: Background Color for a Range?
Post by:
paweld
on
October 01, 2020, 03:16:39 pm
Code: Pascal
[Select]
[+]
[-]
for
i
:
=
0
to
10
do
for
j
:
=
0
to
1
do
WriteBackgroundColor
(
j
,
i
,
RGBToColor
(
235
,
235
,
235
)
)
;
TinyPortal
© 2005-2018