var
  Mybutton:TbuttonMybutton:=Tbutton.create(self);
MYbutton.parents:=form1;
Mybutton.Top:=100;
Mybutton.Width:=20;
Mybutton.Caption:='test'

解决方案 »

  1.   

    ra[h]:=tradiobutton.Create(self);
                ra[h].Parent:=panel7;
                ra[h].Top:=20;
                ra[h].Caption:=fieldbyname('nd').AsString;
                ra[h].Width:=100;
                ra[h].Checked:=true;
      

  2.   

    能将控件发给我吗?[email protected]
      

  3.   

    能将控件发给我吗?[email protected]
    谢谢!
    帮你up!!!!
      

  4.   

    一般的思路:
    在过程中声明一个控件类型的变量
    var controlvar1:TControl;
    然后在需要动态创建的地方调用控件类相应的创建函数
    controlvar1 := TControl.create(self);
      

  5.   

    在控件创建完成后,要设置控件的宽度和高度和可视属性。
    最后最重要的要将控件的parent属性设置为你的绘图区控件的名字。
    如果不行的话,让作者重新改控件。
      

  6.   

    一般来说只要调用了create以后再设置parent属性就可以看到了。
    其它的属性是一样的使用。五百分哦,我也来凑热闹。哈哈