0
0532qd
Unregistered / Unconfirmed
GUEST, unregistred user!
我做了一个512列,48行的DrawGrid,Tag[0..511,0..47]为每个点的数组,值为0为黑色
1为红色,程序一运行就死机,我认为刷新时有问题,它的ondrawcell我是这样写的
var
i,j:integer;
begin
for i:=0 to 47 do
for j:=0 to 511 do
case Tag[j,i] of
1:begin
DrawGrid1.Canvas.Pen:=clBlack;
DrawGrid1.Canvas.Brush:=clBlack;
DrawGrid1.Canvas.Ellipse(acol*6,arow*6,(acol+1)*6,(arow+1)*6);
end;
0:begin
DrawGrid1.Canvas.Pen:=clBlack;
DrawGrid1.Canvas.Brush:=clBlack;
end;
end;
有哪位高手能帮我解决这个问题?谢谢了!
1为红色,程序一运行就死机,我认为刷新时有问题,它的ondrawcell我是这样写的
var
i,j:integer;
begin
for i:=0 to 47 do
for j:=0 to 511 do
case Tag[j,i] of
1:begin
DrawGrid1.Canvas.Pen:=clBlack;
DrawGrid1.Canvas.Brush:=clBlack;
DrawGrid1.Canvas.Ellipse(acol*6,arow*6,(acol+1)*6,(arow+1)*6);
end;
0:begin
DrawGrid1.Canvas.Pen:=clBlack;
DrawGrid1.Canvas.Brush:=clBlack;
end;
end;
有哪位高手能帮我解决这个问题?谢谢了!