设置那个属性啊?谢谢了

解决方案 »

  1.   

    DELPHI里的STRINGGRID是没有这个功能的,推荐你用下TMS的TAdvStringGrid吧,功能确实很全的。
      

  2.   

    procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
      Rect: TRect; State: TGridDrawState);
    var
      W: Integer;
      S: String;
    begin
      with TStringGrid(Sender) do
      begin
        Canvas.FillRect(Rect);
        S := Cells[ACol, ARow];
        W := (Rect.Right - Rect.Left - Canvas.TextWidth(S)) div 2;
        Canvas.TextOut(Rect.Left + W, Rect.Top+5, S);
      end;
    end;—————————————————————————————————
    宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
    —————————————————————————————————