L lea_tao Unregistered / Unconfirmed GUEST, unregistred user! 2000-10-03 #1 DELPHI中TDBGrid 控件中能否单独设置某行的属性? 如:我想在某列中让某些符合特殊条件的行显示绿色, 而其他的行显示其他颜色。
A aerobull Unregistered / Unconfirmed GUEST, unregistred user! 2000-10-03 #2 var s: String; begin s:=DS1.DataSet.FieldByName('领用单位').AsString; if Pos('小计',s)>0 then DBGrid1.Canvas.Font.Color := clgreen; DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
var s: String; begin s:=DS1.DataSet.FieldByName('领用单位').AsString; if Pos('小计',s)>0 then DBGrid1.Canvas.Font.Color := clgreen; DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);