Ver Mensaje Individual
  #7  
Antiguo 09-04-2004
__cadetill __cadetill is offline
Miembro
 
Registrado: may 2003
Posts: 3.387
Reputación: 25
__cadetill Va por buen camino
Pues acabo de probarlo tanto en un TRxDbGrid como en un TDbGrid y me ha funcionado correctamente

Código:
procedure TForm1.RxDBGrid1DrawColumnCell(Sender: TObject;
  const Rect: TRect; DataCol: Integer; Column: TColumn;
  State: TGridDrawState);
var
  Grid: TStringGrid;
  Texto: String;
  Rectangulo: TRect;
begin
  Rectangulo:=Rect;
  Grid := TStringGrid(Sender);
//  if Column.Field.IsBlob then  // <= esta forma también me ha funcionado
  if Column.Field.ClassType = TMemoField then
  begin

    Grid.Canvas.FillRect(Rect);
    Texto := Column.Field.AsString;
    DrawText( Grid.Canvas.Handle,
              PChar(Texto),
              StrLen(PChar(Texto)),
              Rectangulo,
              DT_WORDBREAK);
  end;
end;
Responder Con Cita