当然可以
可以通过findcomponent找到相应组件,进行强制类型转换后,可用相应组控件的属性.procedure TForm1.Button1Click(Sender: TObject);
begin
//在 form 上放一个edit和button
     tedit(self.FindComponent('edit1')).Text := 'I love this game.';
end;

解决方案 »

  1.   


    procedure TForm1.Button1Click(Sender: TObject);
    begin
    //在 form 上放一个edit和button
    if Self.findComponent('edit1') is TEdit then
         tedit(self.FindComponent('edit1')).Text := 'I love this game.';
    end;
      

  2.   

    不是这样,是通过字符串调用属性,如‘Text’。即字符串代表的是属性。
      

  3.   

    从系统单元unit DsgnIntf;中寻找方法吧!
      

  4.   

    是TypeInfo单元,用SetPropValue函数。彻底搞定!