type t_searchdir_mgr=class(tdcreateform) uses tslvcl; panel1:tpanel; panel2:tpanel; splitter1:tsplitter; panel3:tpanel; label1:tlabel; function Create(AOwner);override; //构造 begin inherited; end function DoControlAlign();override;//对齐子控件 begin //当窗口大小改变时,该函数会被调用, //可以通过 clientrect 获取客户区大小,设置子控件的位置以及大小 //如果自己处理了子控件的对齐,就可以去掉 inherited inherited; end function Recycling();override; //回收变量 begin inherited; ci := self.classinfo(); //将成员变量赋值为nil避免循环引用 for i,v in ci["members"] do begin if v["const"] then continue; if v["static"] then continue; invoke(self,v["name"],nil); end end end