Cita:
Empezado por rmora
...sin embargo cuando estas celdas tienen texto, el texto desaparece o no se puede visualizar. Por favor podrían decirme como puedo hacer???. Estoy utilizando el componente tRxDBLib.
|
En ese caso puedes cambiar el color del texto agregando una linea de código:
Código Delphi
[-]procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState);
var
iRowNumber : Integer;
begin
with (Sender as TDBGrid), Canvas do begin
iRowNumber := (Rect.Top + Rect.Bottom) div ((1+Rect.Bottom - Rect.Top)*2);
if Odd(iRowNumber) then Brush.Color := clYellow
else Brush.Color := clWhite;
Font.Color:=clBlack; FillRect(Rect);
DefaultDrawDataCell(Rect, Field, State);
end;
end;
Saludos...
__________________
"Pedid, y se os dará; buscad, y hallaréis; llamad, y se os abrirá." Mt.7:7