procedure TFrmmain.SGjishiDrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);begin if ACol = 0 then begin if SGjishi.Cells[6, ARow] = '货源' then with SGjishi.Canvas do Draw(Rect.Left, Rect.Top, ImageH.Picture.Graphic); if SGjishi.Cells[6, ARow] = '车源' then with SGjishi.Canvas do Draw(Rect.Left, Rect.Top, ImageC.Picture.Graphic); end; //rect.Top:=rect.Top+20; // stringgrid1.Canvas.TextOut(rect.left,rect.top+8,pchar(StringGrid1.Cells[Acol,Arow]) ); //DrawText(StringGrid1.Canvas.Handle,pchar(StringGrid1.Cells[Acol,Arow]),Length(StringGrid1.Cells[Acol,Arow]),Rect, DT_VCENTER or DT_WORDBREAK or DT_LEFT);end;DT_WORDBREAK 这个就是自动换行