怎样得出窗体上的控件数目?
比如:Button类的个数,Edit类的个数.......
比如:Button类的个数,Edit类的个数.......
解决方案 »
- 请教怎样用 ODAC 联接 ORACLE 8.0.5 的问题
- 如何保存多個熱鍵,並且在Form建立的時候注冊多個熱鍵?(可能有些難。。。)
- 800分球一程序段——可以再加!
- 怎么样判断是否对dbgrid的数据进行了修改操作?
- 在程序运行的时候怎样把TGroupBox控件的框去掉
- 如何取另一程序listview列表的值
- 我需要从一个FTP站点上下载一个视频文件,但必需边下载可以边放影,但我已经把文件写方式定为“FmOpenReadWrite”,为什么不行呢
- 散分~~~~请教:关于类和对象~~2天内结帐~~
- 关于Database连接的怪问题?在线等待
- delphi 6手册组,我翻译好的文件无法上传,谁知道该怎么办?
- 如何截取客户端收到的数据?
- 请教几个IE的问题:
begin
I:=Form1.ComponentCount
end
begin
for i:=0 to ComponentCount-1 do begin
if (Components[i] is TControl) then
inc(control_count);
end;
end; 你要想得到EDIT等的数目,只要将上面的TControl换成相应的类如TEDIT就行了
i: Integer;
ButtonCount: Integer;
EditCount: Integer;
begin
ButtonCount := 0;
EditCount := 0;
for i := 0 to ComponentCount - 1 do
if Components[i] is TButton then Inc(ButtonCount) else
if Components[i] is TEdit then Inc(EditCount) else
if Components[i] is ...
end;