procedure TForm1.BitBtn1Click(Sender: TObject); var i,j:Integer; begin for i := 1 to 9 do for j := 1 to 9 do StringGrid1.Cells[i,j]:=IntToStr(i*j); end; procedure TForm1.BitBtn2Click(Sender: TObject); begin Close; end; procedure TForm1.FormCreate(Sender: TObject); var i:Integer; begin for i := 1 to 9 do begin StringGrid1.Cells[0, i] := IntToStr(i); StringGrid1.Cells[i, 0] := IntToStr(i); end; end;
下载地址:
https://files.cnblogs.com/files/blogs/664406/%E5%AE%9E%E4%BE%8B3.rar
原文:https://www.cnblogs.com/51delphi/p/14616419.html