可以
—————————————————————————————————
MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
             毁誉由人,望天上云卷云舒,聚散任风。';
if Not Assigned(I) then
  I := TI.Create(Nil);
I.Maxim := MaximStr;
—————————————————————————————————
       

解决方案 »

  1.   

    procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;0D
      DataCol: Integer; Column: TColumn; State: TGridDrawState);
    begin
      if Column.FieldName ='CustNo' then
        DBGrid1.Canvas.Draw(……); //画上图标即可
    end;
    —————————————————————————————————
    MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
                 毁誉由人,望天上云卷云舒,聚散任风。';
    if Not Assigned(I) then
      I := TI.Create(Nil);
    I.Maxim := MaximStr;
    —————————————————————————————————
           
      

  2.   

    procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
      DataCol: Integer; Column: TColumn; State: TGridDrawState);
    var
      Code: Integer;
      Bmp: TBitmap;
    begin
      // erase existing output
      DBGrid1.Canvas.FillRect (Rect);  if Column.Field = Table1Graphic then
      begin
        // draw the image
        Bmp := TBitmap.Create;
        try
          Bmp.Assign (Table1Graphic);
          DBGrid1.Canvas.StretchDraw (Rect, Bmp);
        finally
          Bmp.Free;
        end;
      end
      else
      begin
        // choose the font color
        if (Column.Field = Table1Lengthcm) and
            (Table1Lengthcm.AsInteger > 100) then
          DBGrid1.Canvas.Font.Color := clRed
        else if gdSelected in State then
          DBGrid1.Canvas.Font.Color := clHighlightText
        else
          DBGrid1.Canvas.Font.Color := Column.Font.Color;
        // draw the standard text
        DBGrid1.Canvas.TextRect (
          Rect, Rect.Left, Rect.Top,
          Column.Field.AsString);
      end;  // optionally draw the focus rectangle
      if gdFocused in State then
        DBGrid1.Canvas.DrawFocusRect (Rect);
    end;