procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var FLAGG: Boolean;
begin
FLAGG:=False;
k:=1;
kk:=1;
for k:=1 to 10 do
for kk:=1 to 10 do
begin
with StringGrid1 do
begin
StringGrid1.Cells[k-1,kk-1]:=M[k,kk];
FLAGG:=True;
end;
end;
with StringGrid1, StringGrid1.Canvas do
if StringGrid1.Cells[ACol,ARow ]=' ' then
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, 0, True);
with StringGrid1, StringGrid1.Canvas do
if StringGrid1.Cells[ACol,ARow ]='*' then
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, 1, True);
with StringGrid1, StringGrid1.Canvas do
if StringGrid1.Cells[ACol,ARow ]='0' then
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, 6, True);
if StringGrid1.Cells[ACol,ARow ]='1' then
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, 5, True);
if StringGrid1.Cells[ACol,ARow ]='2' then
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, 2, True);
if StringGrid1.Cells[ACol,ARow ]='3' then
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, 3, True);
if StringGrid1.Cells[ACol,ARow ]='4' then
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, 4, True);
end;