在文本框的数组中设置int值 [英] set int value in array of textbox
本文介绍了在文本框的数组中设置int值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Public txtRandomTextBox()As TextBox
Public Sub New()
txtRandomTextBox = New TextBox(){txt_FreqResolution,txt_Average,txt_bandWidth }
结束子
我有一个文本框控件数组。
我想设置一些默认值在每个整数类型。
我怎么能这样做?在VB.NET
谢谢
解决方案
对于 每个 t 作为 TextBox In txtRandomTextBox
t.Text = defaultValue.ToString()
Next
其中defaultValue
是您需要的默认值
Public txtRandomTextBox() As TextBox
Public Sub New()
txtRandomTextBox = New TextBox() {txt_FreqResolution, txt_Average, txt_bandWidth}
End Sub
I have a array of textbox control.
I want to set some default values in each of integer type.
How can i do so ?? in VB.NET
thanks解决方案For Each t As TextBox In txtRandomTextBox t.Text = defaultValue.ToString() Next
wheredefaultValue
is whatever the default value is that you need
这篇关于在文本框的数组中设置int值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文