Ver Mensaje Individual
  #5  
Antiguo 27-01-2011
Avatar de BlueSteel
[BlueSteel] BlueSteel is offline
Miembro Premium
 
Registrado: may 2003
Ubicación: Concepción - Chile
Posts: 2.310
Reputación: 23
BlueSteel Va por buen camino
Cita:
Empezado por murci Ver Mensaje
En el codigo del envento ONGetCellParams, seria algo asi.

Código:
procedure TForm1.DBGrid1GetCellParams(Sender: TObject; Field: TField;
  AFont: TFont; var Background: TColor; Highlight: Boolean);
begin
  if Highlight then begin
     AFont.Color := clYellow;
     Background := clNavy;
  end;
end;
Espero que te sirva de ayuda.

Hola... quiero aplicar esto, por que cuando selecciono una fila, no se distingue el contenido por que la letra esta en blanco y como adicional a esto le tengo convinacion de colores con el siguiente codigo

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
     DBGrid1.Canvas.Brush.Color := $00D6F8D9
  else
     DBGrid1.Canvas.Brush.Color := $00D9FDF8;
  DBGrid1.DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;

pero no encuentro la propiedad ONGetCellParams del DBGrid....

Me interesa cambiar el color de la fuente... alguien sabe como realizarlo...

Salu2
__________________
BlueSteel
Responder Con Cita