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

Gracias por la respuesta, pero por más que cambio las posiciones y demas ,no hay manera de que vea en la celda y dentro del rectangulo creado el texto,y no se que hacer.
Ahora mismo, lo he dejado así y me escribe un rectángulo dentro de la celda pero no aparece el texto.
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.Font.Color := clRed;
    StringGrid.Canvas.font.Style := Entrada_Datos.canvas.Font.Style + [fsBold];
    StringGrid.Canvas.Brush.Color := clYellow ;
    StringGrid.Canvas.Brush.Style := bsSolid;
    StringGrid.Canvas.TextRect(TheRect,1,1,'Hola');
    StringGrid.Canvas.FrameRect(TheRect);
  end;
end;

Última edición por ecfisa fecha: 11-03-2011 a las 14:44:18. Razón: ETIQUETAS DELPHI
Responder Con Cita