OnDrawCell: //if 条件 begin StringGrid1.Canvas.Brush.Color := clblack; StringGrid1.Canvas.FillRect(Rect); with StringGrid1.Canvas do Textout(rect.left+3,rect.top+2,StringGrid1.Cells[ACol,ARow]); end;
OnDrawCell:StringGrid1.Canvas.Brush.Color := clblack; StringGrid1.Canvas.FillRect(Rect); with StringGrid1.Canvas do Textout(rect.left+3,rect.top+2,StringGrid1.Cells[ACol,ARow]);
//if 条件
begin
StringGrid1.Canvas.Brush.Color := clblack;
StringGrid1.Canvas.FillRect(Rect);
with StringGrid1.Canvas do
Textout(rect.left+3,rect.top+2,StringGrid1.Cells[ACol,ARow]);
end;
StringGrid1.Canvas.FillRect(Rect);
with StringGrid1.Canvas do
Textout(rect.left+3,rect.top+2,StringGrid1.Cells[ACol,ARow]);