G
glglgl
Unregistered / Unconfirmed
GUEST, unregistred user!
StringGrid中,有几个网格颜色是红的,其它是白的,
如何将红的网格的值不变,白的网格的值+2?
以下是网格变色代码:(供参考)
procedure TForm1.allSGDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
SG.Canvas.brush.Color := clInfoBk;
SG.Canvas.FillRect(Rect);
SG.Canvas.TextOut (
rect.left,rect.top,allSG.Cells[acol,arow]);
end;
如何将红的网格的值不变,白的网格的值+2?
以下是网格变色代码:(供参考)
procedure TForm1.allSGDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
SG.Canvas.brush.Color := clInfoBk;
SG.Canvas.FillRect(Rect);
SG.Canvas.TextOut (
rect.left,rect.top,allSG.Cells[acol,arow]);
end;