如题.如何设?

解决方案 »

  1.   

    使用的控件事件为StringGrid.OnDrawColumeCell:
    procedure TForm1.StringGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
    begin
      StringGrid1.Canvas.Font.Color := clBlue;
      StringGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
    end;
      

  2.   

    to sysu :
    第二句出错。根本没有DefaultDrawColumnCell这个过程。
      

  3.   

    Sorry, 在OnDrawCell事件中:
    procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
      Rect: TRect; State: TGridDrawState);
    begin
      with StringGrid1.Canvas do begin
        Font.Color := clBlue;
        TextOut(Rect.Left+2, Rect.Top+3, StringGrid1.Cells[ACol, ARow]);
      end;
    end;