Ver Mensaje Individual
  #3  
Antiguo 22-09-2004
ctronx ctronx is offline
Miembro
 
Registrado: jun 2004
Posts: 214
Reputación: 21
ctronx Va por buen camino
Unhappy

Saludos, gracias por tu ayuda pero tu ejemplo no me permite especificar una determinada columna para alinear a la derecha.

este ejemplo si me pide la columna que quiero alinear pero me marca que no esta declarada ó definida DrawText, a de faltar una Unit ó algo asi, espero me puedan ayudar.

Código Delphi [-]

procedure Tfrmventas.StringGrid1DrawCell(Sender: TObject; ACol,
  ARow: Integer; Rect: TRect; State: TGridDrawState);
  begin
if ACol=2 then // voy a alinear a la derecha la 3ª columna
if ARow>0 then //No quiero alinear la línea de títulos
with StringGrid1 do
     begin
     Canvas.FillRect(Rect);
     DrawText(Canvas.Handle,PChar(Cells[Acol,ARow]),-1,Rect,
          DT_CENTER or DT_RIGHT or DT_SINGLELINE);
     end;

end;
Responder Con Cita