Ver Mensaje Individual
  #4  
Antiguo 02-05-2006
Avatar de JavierB
JavierB JavierB is offline
Miembro
 
Registrado: may 2003
Ubicación: Madrid
Posts: 99
Reputación: 22
JavierB Va por buen camino
Hola Luciano M.

Había puesto un código por ahí pero debe haberse perdido, así que lo repito:
Código Delphi [-]
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
  DataCol: Integer; Column: TColumn; State: TGridDrawState);
var
  Num: Integer;
  R: TRect;
begin
  Num:=TStringGrid(DBGrid1).Row;
  R:=TStringGrid(DBGrid1).CellRect(DataCol,Num);
  if R.Top=Rect.Top then
    with DBGrid1 do
    begin
      if (gdFocused in State) then
        Canvas.Font.Color:=clWhite
      else
        Canvas.Font.Color:=clRed;
      Canvas.Font.Style:=[fsBold];
      DefaultDrawColumnCell(Rect,DataCol,Column,State);
    end;
end;
Espero que te sirva. Saludos,
__________________
Lo importante no es saber, sino tener el e-mail del que sabe.
Responder Con Cita