3 Haziran 2014 Salı

Stringgrid,button example. Colcount,Row Count

procedure TForm1.Button1Click(Sender: TObject);
var
r,c,j,i:integer;
begin
r:=strtoint(edit1.text);
c:=strtoint(edit2.text);
StringGrid1.ColCount:=c+1;
StringGrid1.RowCount:=r+1;
for i:=1 to c do
 begin
  for j:=1 to r  do
  begin
  if (i+j)>r+2  StringGrid1.Cells[i,j]:=inttostr((i+j)-1);
  end;
 end;
end;
end.



Hiç yorum yok:

Yorum Gönder