Recent

Author Topic: Paint alternate rows in dbgrid  (Read 2549 times)

Ericktux

  • Sr. Member
  • ****
  • Posts: 345
Paint alternate rows in dbgrid
« on: April 29, 2016, 07:46:09 pm »
Hello, I can paint alternate rows in dbgrid, as the attached image.

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: Paint alternate rows in dbgrid
« Reply #1 on: April 29, 2016, 08:28:59 pm »
Code: Pascal  [Select][+][-]
  1. DBGrid1.AlternateColor := clYellow;

Ericktux

  • Sr. Member
  • ****
  • Posts: 345
Re: Paint alternate rows in dbgrid
« Reply #2 on: April 29, 2016, 08:47:29 pm »
Thansk this works!!  :) :)

Code: Pascal  [Select][+][-]
  1. procedure TForm2.FormCreate(Sender: TObject);
  2. begin
  3.   DBGrid1.AlternateColor := clYellow;
  4. // ... more codes
  5. end;  

Ericktux

  • Sr. Member
  • ****
  • Posts: 345
Re: Paint alternate rows in dbgrid
« Reply #3 on: April 29, 2016, 09:32:45 pm »
also it works  :)

Code: Pascal  [Select][+][-]
  1.   DBGrid1.AlternateColor := $00E8E8E8;   // color gray

 

TinyPortal © 2005-2018