procedure TD11F.dbgD12DrawColumnCell(Sender: TObject; ACol, ARow: Integer;
Column: TUniDBGridColumn; Attribs: TUniCellAttribs);
begin
if Column.FieldName='DX2_13' then//变颜色的列
begin
if Column.Field.DataSet.FieldByName('DX2_13').AsFloat>Column.Field.DataSet.FieldByName('DX2_21').AsFloat then//条件
begin
Attribs.Font.Color:=clBlue;
Attribs.Font.Size:=12;
Attribs.Font.Style:=[fsBold]
end
end;
end;
unidbgrid 根据条件设置单元格字体颜色及其它格式
最新推荐文章于 2023-12-16 08:16:36 发布