|
发表于 2020-11-27 15:45:01
|
显示全部楼层
给你参考一下:
ARect:=AViewInfo.Bounds;
ATextToDraw := AViewInfo.GridRecord.DisplayTexts[AViewInfo.Item.Index];
val := VarAsType(AViewInfo.GridRecord.DisplayTexts[EmpGridChangeType.Index], varString);
if val <> '在职' then ACanvas.Canvas.Brush.Color := clRed;
ACanvas.Canvas.FillRect(ARect);
SetBkMode(ACanvas.Canvas.Handle, TRANSPARENT);
ACanvas.DrawText(ATextToDraw, AViewInfo.Bounds, 0);
如果不是在职,则显示为红色 |
|