И еще проблема -
Код:
var
Button: TButton;
i,y:integer;
begin
form2.adotable1.First ;
y:=50;
for i:=1 to form2.adotable1.RecordCount do begin
form2.Button:=TButton.Create(Self);
form2.Button.Parent := Self;
form2.Button.Left := 50;
form2.Button.Top := y;
form2.Button.Width := 100;
form2.Button.Height := 30;
form2.Button.Caption:=form2.adotable1.Fields[2].AsString ;
form2.adotable1.Next;
Inc(Y,35);
end;
end;
Получаю ошибку типа Неизвестный Button во всех случаях. В чем ошибка?