我在DrawCell中的代码如下:
if (Cells[ACol,ARow]='1') and (arow<>0) then
begin
canvas.Font.Color:=clwhite;
canvas.Brush.Color:=clgreen;
canvas.fillrect(rect);
Canvas.TextOut(Rect.Left +15, Rect.Top + 2, Cells[ACol,ARow]);
//DrawText(Grid1.Canvas.Handle, PChar(CellStr), Rect,Mode)
end ;
在其他的事件中更改了Cells[ACol,ARow]的值,也用了Grid1.Repaint; Grid1.Refresh; Grid1.Update;但是StringGrid就是不会自动刷新,要我用鼠标点到那个格子上颜色才会变,怎么回事呀?高手帮忙解决一下!!
if (Cells[ACol,ARow]='1') and (arow<>0) then
begin
canvas.Font.Color:=clwhite;
canvas.Brush.Color:=clgreen;
canvas.fillrect(rect);
Canvas.TextOut(Rect.Left +15, Rect.Top + 2, Cells[ACol,ARow]);
//DrawText(Grid1.Canvas.Handle, PChar(CellStr), Rect,Mode)
end ;
在其他的事件中更改了Cells[ACol,ARow]的值,也用了Grid1.Repaint; Grid1.Refresh; Grid1.Update;但是StringGrid就是不会自动刷新,要我用鼠标点到那个格子上颜色才会变,怎么回事呀?高手帮忙解决一下!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货