InfoPower3000里面怎么改变DBGrid列的颜色?有没有人知道?麻烦告诉我一下,谢谢

解决方案 »

  1.   

    把DBGrid.DefaultDrawing设成FALSE  
    在DBGRID的DrawColumnCell事件加入
      if 你的条件 then
       begin
          DBGrid1.Canvas.Brush.Color := clRed;
       end
       else
       begin
          DBGrid1.Canvas.Brush.Color := clWhite;
       end;
       DBGrid.DefaultDrawColumnCell(Rect,DataCol,Column,State);
    以前的帖子有很多这样的问题,可以自己看看。
      

  2.   

    在OnCalcCellColors事件中加入以下语句即可:
    if field.index = 你所要的字段位置 then 
    ABrush.Color := 你所要的颜色;