保存运行时创建的多个控件位置
我在运行时创建好了多个控件,并且位置有用户自己拖动,现在创建好了但时却没法保存这些控件,请教大家指点:
我时这么做的:
创建控件:
cxTextEdit:=TcxTextEdit.Create(self);
cxTextEdit.Parent:=Frm_Designer_Center.Panel1;
.....
保存控件:
for I := 0 to Frm_Designer_Center.ComponentCount-1 do
begin
showmessage(Frm_Designer_Center.Components[I].ClassName);
......
结果是,循环到只有在设计时的控件,没有找到运行时创建的控件