DEV cxgrid 自绘相关
procedure cxgrdbndclmn_jgzqCustomDrawCell( Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); var ts:integer; begin ts := 0; trystrtoint(VartoStr(AViewInfo.GridRecord.DisplayTexts[cxgrdbndclmn_jgzq.Index]), ts); if ts = 3 then ACanvas.Brush.Color := RGB(255,192,105) else if (ts >3) and (ts <=5) then ACanvas.Brush.Color := RGB(250,68,28) else if ts > 5 then ACanvas.Brush.Color := RGB(207,19,34); if ts >=3 then begin AViewInfo.EditViewInfo.TextColor := clwhite; AViewInfo.EditViewInfo.BackgroundColor := ACanvas.Brush.Color; AViewInfo.EditViewInfo.Paint(ACanvas); ADone := True; end; end;