Ver Mensaje Individual
  #11  
Antiguo 07-09-2007
[FGarcia] FGarcia is offline
Miembro Premium
 
Registrado: sep 2005
Ubicación: Cordoba, Veracruz, México
Posts: 1.123
Reputación: 20
FGarcia Va por buen camino
JEJE!

Como me fui a comer no habia probado nada del codigo pero copy & paste el tuyo, le cambie el nombre del stringgrid y me aparece el mismo error que mencionas

edito: OK Corregido

Código Delphi [-]
procedure TfrmMain.StringGrid1DrawCell(Sender: TObject; ACol,
  ARow: Integer; Rect: TRect; State: TGridDrawState);
var sCad: String;
    i: Integer;
begin
  If (ACol=1) Or (ACol=2) Then
    If StringGrid1.Cells[ACol,ARow] <> '' Then
      Begin
        sCad := StringGrid1.Cells[ACol,ARow];
        With StringGrid1 Do
          with Canvas,Rect do   //ESTA es la linea que faltaba
          Begin
            i:=Right-TextWidth(sCad+' ');
            Canvas.FillRect(Rect);
            Canvas.TextOut(i,Top+2,sCad);
          End;
      End;

end;

Última edición por FGarcia fecha: 07-09-2007 a las 22:02:58.
Responder Con Cita