Cambiar el color de fuente en TDBGID
Tengo el siguiente código
procedure TFMantenimientoVentas.GFacturasDrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if DM.THisFac.RecordCount > 0 then begin
if state <> [gdfocused] then begin
with Sender as TExtendedGrid do begin
if DM.THisFacAnulado.AsString = 'X' then GFacturas.canvas.Font.Color:=clRed
else GFacturas.canvas.Font.Color := clBlack;
end;
end;
GFacturas.DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
end;
El caso es que al estar sobre un registro y ser la barra del registro activo azul y la fuente negra no se ven bien los datos del registro.
Antes de modificar ese evento los datos del registro activo salen en color blanco sobre la barra del registro activo en color azul, con lo que se distinguen perfectamente los datos del registro.
Espero hacerme entender con claridad.. Y AGRADEZCO VUESTRA AYUDA!!!
|