if (Self.Controls[n].ClassName='TCheckbox') and (tcheckbox(Self.Controls[n]).Checked =true) then
begin
m:=m+1 ;
end;
这一句:
if (Self.Controls[n].ClassName='TCheckbox') and (tcheckbox(Self.Controls[n]).Checked =true) then
为什么总是假?下面的语句:
begin
m:=m+1 ;
end;
总是无法执行到呢?!:(
能解说一下Self.Controls[n].ClassName吗??可不可以直接统计checkbox被选中的个数呢?
begin
m:=m+1 ;
end;
这一句:
if (Self.Controls[n].ClassName='TCheckbox') and (tcheckbox(Self.Controls[n]).Checked =true) then
为什么总是假?下面的语句:
begin
m:=m+1 ;
end;
总是无法执行到呢?!:(
能解说一下Self.Controls[n].ClassName吗??可不可以直接统计checkbox被选中的个数呢?
解决方案 »
- DELPHI 不等于
- 各位delphi的前辈 小弟刚学 求indy10.5.5的例程
- 急救!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 请问如何实现编一个数据导入导出模块!
- delphi7的问题,indy client组件下的idftp控件能实现文件传输的问题吗?
- 问一下,做网站的弟兄们一个问题。。。。
- 如何将word文档或execl表格写入数据库(期盼您的解答)
- 散分,順便出出主意!
- 关于delphi数据导到EXCEL报错的问题
- 网络平台这个光鲜的肥皂泡越来越肥了
- Borland公司服务方面需要加强,请大家谈谈个人的想法
- 高手请进 ****当使用指针传递对象时,对象的生命期是怎么控制的?****
and (tcheckbox(Self.Controls[n]).Checked =true) then
宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
————————————————————————————————————
begin
m:=m+1 ;
end;
if (Self.Components[i] is TCheckBox) and TCheckBox(Self.Components[i]).Checked then
m:=m+1;
m:=m+1;
if (Self.Controls[n].ClassName is TCheckbox) then
begin
if Tcheckbox(Self.Controls[n]).Checked then
M := M + 1 ;
end;
CheckBox的ClassName 为TCheckBox
不是TCheckbox
for i:=0 to self.ControlCount-1 do
begin
if self.controls[i].className='TCheckBox' then
begin
if TCheckBox(Self.controls[i]).Checked then
m:=m+1;
end;
end;