Ver Mensaje Individual
  #4  
Antiguo 01-10-2024
pruz pruz is offline
Miembro
 
Registrado: sep 2003
Posts: 225
Reputación: 23
pruz Va por buen camino
Hola, ya probe y funcion perfecto.

solo le hice una mejora, para las cabeceras de columna, ponerlas de otro color.


Código Delphi [-]
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);
begin
  if ARow = 0 then   StringGrid1.Canvas.Brush.Color := clSilver // Color de fondo cabezera de columna
  else   StringGrid1.Canvas.Brush.Color := clYellow; // Color de fondo todas las demas columnas

    StringGrid1.Canvas.FillRect(Rect);
    StringGrid1.Canvas.TextRect(Rect, Rect.Left + 2, Rect.Top + 2, StringGrid1.Cells[ACol, ARow]);

end;

Gracias
Responder Con Cita