procedure TdmOrderLite.dbbvOrderExploreLite_customer_s_nameCustomDrawCell (Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); var vRect: TRect; vImg: Variant; begin vImg := AViewInfo.RecordViewInfo.GridRecord.Values [dbbvOrderExploreLite_customer_status.Index]; vRect.Left := AViewInfo.Bounds.Left + 18; vRect.Top := AViewInfo.TextBounds.Top; vRect.Right := AViewInfo.ContentBounds.Right; vRect.Bottom := AViewInfo.TextBounds.Bottom; ACanvas.FillRect(AViewInfo.Bounds); if vImg <> null then begin case vImg of 45: ACanvas.DrawImage(dmCommon.il16, AViewInfo.Bounds.Left, AViewInfo.Bounds.Top, IMG_OK, true); .... else ACanvas.DrawImage(dmCommon.il16, AViewInfo.Bounds.Left, AViewInfo.Bounds.Top, IMG_STOP, true); end; ACanvas.DrawTexT(AViewInfo.text, vRect, cxAlignLeft, true); ADone := true; end; |