TComponent.ComponentCount
Note: This code does not save the form or data module to disk after the nonvisual components are moved. If executed at runtime, the effect will not persist.var I: Integer;
Temp: TComponent;
begin
for I := ComponentCount - 1 downto 0 do
begin
Temp := Components[I];
if not (Temp is TControl) then
begin
RemoveComponent(Temp);
DataModule2.InsertComponent(Temp);
end;
end;
end;
:三目运算符? 没有
Note: This code does not save the form or data module to disk after the nonvisual components are moved. If executed at runtime, the effect will not persist.var I: Integer;
Temp: TComponent;
begin
for I := ComponentCount - 1 downto 0 do
begin
Temp := Components[I];
if not (Temp is TControl) then
begin
RemoveComponent(Temp);
DataModule2.InsertComponent(Temp);
end;
end;
end;
:三目运算符? 没有
解决方案 »
- 关于Delphi下的三元运算符?
- 紧急求助,远程文件传输.
- 如何用好delphi的帮助文档?
- 请问treeview组件判断一个节点是否为叶子节点的属性是什么啊?
- 在数据库中如何设置字段的类型,在delphi感知控件中显示为dbcheckbox类型?
- 怎样取字符串中第四个空格后的字符串(在线等待)
- datacontrol中有没有类似于editmask的控件?若没有如何实现输入规格化??
- Indy 中的TidTCPClient如何进行跨网段发送?具体请进!
- 请问Class TIELabel 的作用?怎样在面板上添加该类组件?谢谢!
- 当用这个"显示PDF文件的控件"时,怎样在加载有密码的PDF时自动输入密码(假设密码已知) ???(分在别处,答对一定给)
- 请问如何在windows上屏蔽网上邻居?(谢谢)
- 如何读超大文本文件?
遍历所有组件用Components属性。
至于用法txy已经举了例子。