Ver Mensaje Individual
  #8  
Antiguo 28-01-2011
Avatar de olbeup
olbeup olbeup is offline
Miembro
 
Registrado: jul 2005
Ubicación: Santiago de la Ribera (España)
Posts: 685
Reputación: 19
olbeup Va camino a la fama
Cita:
procedure TIngreso_Reg.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if Odd(DBGrid1.DataSource.DataSet.RecNo) then
DBGrid1.Canvas.Brush.Color := $00D6F8D9
else
DBGrid1.Canvas.Brush.Color := $00D9FDF8;
DBGrid1.DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
Código Delphi [-]
procedure TIngreso_Reg.DBGrid1DrawColumnCell(Sender: TObject;
  const Rect: TRect; DataCol: Integer; Column: TColumn;
  State: TGridDrawState);
begin
  if Odd(DBGrid1.DataSource.DataSet.RecNo) then
     if (gdFocused in State) then
       DBGrid1.Canvas.Brush.Color := $OtroColor
     else
       DBGrid1.Canvas.Brush.Color := $00D6F8D9
  else
     if (gdFocused in State) then
       DBGrid1.Canvas.Brush.Color := $OtroColor
     else
       DBGrid1.Canvas.Brush.Color := $00D9FDF8;
  DBGrid1.DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
Espero que te sirva.

Un saludo.
Responder Con Cita