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][+][-]
  1. for i:=0 to 10 do
  2.       WriteBackgroundColor(0, i, RGBToColor(235, 235, 235));
  3. for i:=0 to 10 do
  4.       WriteBackgroundColor(1, i, RGBToColor(235, 235, 235));
  5.  

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][+][-]
  1. ....
  2. With Canvas do
  3. begin
  4. Brush.color := RGBToColor(235, 235, 235);
  5. Pen.Color := Brush.Color;
  6. Rectangle (0,0,2,11);
  7. end;
  8.  

Winni
Title: Re: Background Color for a Range?
Post by: paweld on October 01, 2020, 03:16:39 pm
Code: Pascal  [Select][+][-]
  1. for i:=0 to 10 do
  2.   for j:=0 to 1 do
  3.     WriteBackgroundColor(j, i, RGBToColor(235, 235, 235));
TinyPortal © 2005-2018