怎么样能改变DBGrid空白区的颜色,有其它能实现这个功能的控件吗,如果有到哪里去
下载,控件名叫什么...

解决方案 »

  1.   

    有啊 !  第三方控件 cxGrid很好用的,功能很强大哦!
      

  2.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    dbgrid1.Color :=clred;
    end;
      

  3.   

    是DBGrid中除Title,Cell以外的区域的颜色啊!急!急!急!急!
    哪里有cxDBGrid控件啊!,能否给发一个 [email protected]
      

  4.   

    不需要用第三方控件吧?不是有个FixedColor属性吗?另外在DBGrid的OnDrawColumnCell里面加代码就可以了,如下:procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject;
      const Rect: TRect; DataCol: Integer; Column: TColumn;
      State: TGridDrawState);
    begin
      with TDBGrid(Sender) do
      begin
        case Self.ADOQuery1.RecNo Mod 2 of
          0: Canvas.Brush.Color :=clMoneyGreen;
          1: Canvas.Brush.Color :=clWindow;
        end;
        if gdSelected in State then  //这个是改变被选择行的高亮颜色
        begin
          Canvas.Font.Color :=clBackground;
          Canvas.Brush.Color:=clSkyBlue;
          Canvas.FillRect(Rect);
        end;
        DefaultDrawColumnCell(Rect,DataCol,Column,State);
      end;
    end;
      

  5.   

    不需要用第三方控件吧?不是有个FixedColor属性吗?另外在DBGrid的OnDrawColumnCell里面加代码就可以了,如下:procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject;
      const Rect: TRect; DataCol: Integer; Column: TColumn;
      State: TGridDrawState);
    begin
      with TDBGrid(Sender) do
      begin
        case Self.ADOQuery1.RecNo Mod 2 of
          0: Canvas.Brush.Color :=clMoneyGreen;
          1: Canvas.Brush.Color :=clWindow;
        end;
        if gdSelected in State then  //这个是改变被选择行的高亮颜色
        begin
          Canvas.Font.Color :=clBackground;
          Canvas.Brush.Color:=clSkyBlue;
          Canvas.FillRect(Rect);
        end;
        DefaultDrawColumnCell(Rect,DataCol,Column,State);
      end;
    end;
      

  6.   

    问题还是没有解决,谁能给出我cxgrid控件的具体下载网址???
    up