可见范围的文本框 [英] Visible range of textboxes
本文介绍了可见范围的文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能看到只有文本框的范围。
例如:
在textbox100中的值是10,我想只看到前10个文本框,然后隐藏。
有可能吗?
我尝试过:
我还没有尝试过任何东西
解决方案
迭代Controls集合,并将Visible设置为false:< br $> b $ b
Dim count As 整数 = 0
对于 每个 c 作为控制在中控制
Dim tb As TextBox = TryCast (c,TextBox)
如果 tb IsNot Nothing 然后
count + = 1
tb.Visible = count< = 10
结束 如果
下一步
Hi,
how can I do visible only range of textboxes.
For example:
In textbox100 will be value 10 and I would like to do visible only first 10 textboxes and next hide.
is it possible?
What I have tried:
I have not tried anything yet
解决方案
Iterate through the Controls collection, and set Visible to false:
Dim count As Integer = 0 For Each c As Control In Controls Dim tb As TextBox = TryCast(c, TextBox) If tb IsNot Nothing Then count += 1 tb.Visible = count <= 10 End If Next
这篇关于可见范围的文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文