procedure TFrmmain.SGjishiDrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);begin// SGjishi.Canvas.TextOut(Rect.left, Rect.Top + 8, pchar(SGjishi.Cells[ACol, ARow])); ///2009.3.26.10.00 wf DrawText(SGjishi.Canvas.Handle, pchar(SGjishi.Cells[ACol, ARow]), length(SGjishi.Cells[ACol, ARow]), Rect, DT_VCENTER or DT_WORDBREAK or DT_LEFT); /// 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;end;