我想要一个控件,最好是Grid的,
它能让前面几行显示一种颜色 , 后面几行又显示一种不同的颜色,请问有没有这种第三方的控件,最好有教程谢谢!

解决方案 »

  1.   

    如果你说的是DBGRID,那么不需要第三芳控件的啊
    用CANVAS就行了
      

  2.   

    同意  kongshanxuelin(空山雪林) 的方法。用这个程序就可以。注意在DBGrid2DrawColumnCell事件中procedure TForm4.DBGrid2DrawColumnCell(Sender: TObject; const Rect: TRect;
      DataCol: Integer; Column: TColumn; State: TGridDrawState);
    begin
         if datamodule22.adoquery2.FieldByName('explorer').AsBoolean = true then
         begin
            DBGrid2.Canvas.Font.Color := clBlue;
            DBGrid2.Canvas.Brush.Color:=clGradientActiveCaption;
         end;
         DBGrid2.DefaultDrawColumnCell(Rect, DataCol, Column, State);
    end;