如何查看表单中每个复选框的属性? [英] How do I check property of every checkbox in the form ?
本文介绍了如何查看表单中每个复选框的属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果TypeOf CControl是CheckBox = True那么
如果ccontrol.checkedstate = true那么
'功能
结束如果
结束如果
我尝试过:
如何查看表单中每个复选框的属性?
和prefrom函数查找值为真
If TypeOf CControl Is CheckBox = True Then
if ccontrol.checkedstate = true then
'function
end if
end if
What I have tried:
how do i check property of every checkbox in the form?
and prefrom function on finding value true
推荐答案
假设您指的是然后你需要在WinForms窗体中查询窗体的Controls Collection - 这是如何:使用访问控件的方法控件集合 [ ^ ] - 原则也适用于ASP.net
如果您使用的是WPF,请阅读这个 [ ^ ]而不是
Assuming you are referring to a WinForms form then you need to query the Controls Collection for the form - here is how How to: Access Controls by using the Controls Collection[^] - principle applies to ASP.net too
If you are using WPF then read this[^] instead
这篇关于如何查看表单中每个复选框的属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文