Ver Mensaje Individual
  #1  
Antiguo 10-03-2011
ander ander is offline
Miembro
 
Registrado: may 2003
Posts: 56
Reputación: 21
ander Va por buen camino
Cambiar fuente de texto en celdas de StringGrid

Hola a todos.
Podria decirme alguien, como podria cambiar en un StringGrid y en una columna determinada,el color de la celda y el tipo de texto.
por ej. uso esto:
-----------------------------------------------------------------
Código Delphi [-]
procedure TForm1.StringGridDrawCell(Sender: TObject; ACol,
  ARow: Integer; Rect: TRect; State: TGridDrawState);
var
  TheRect :TRect;
begin
  if ACol=3 then
  begin
    TheRect :=StringGrid.CellRect(ACol,Arow);
    StringGrid.Canvas.TextRect(TheRect,1,1,'Hola');
    StringGrid.Canvas.brush.Color := clred;
    StringGrid.Canvas.FrameRect(TheRect);
  end;
end;
----------------------------------------------------------------
No hay manera de escribir el texto dentro de la celda,pero puedo colorearlo.
Gracias de antemano

Última edición por ecfisa fecha: 11-03-2011 a las 01:16:19. Razón: ETIQUETAS DELPHI
Responder Con Cita