以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 定义控件 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=55117) |
-- 作者:shanmao -- 发布时间:2014/8/11 12:17:00 -- 定义控件 把控件定义为数组,动态添加到窗口中。 Dim labels() As String = {"label1","label2","label3","label4"}
然后我想把每个控件的text属性也定义为数组,把每个值都分配对应到上面的控件中。这个用数组方式怎么定义? |
-- 作者:Bin -- 发布时间:2014/8/11 12:27:00 -- Dim labels() As String = {"label1","label2","label3","label4"} for i as integer = 0 to labels.length-1 lbl = e.Form.CreateControl(labels(i), ControlTypeEnum.Label)Dim lbl As WinForm.Label lbl.Text = "Foxtable" lbl.Left = 100*i lbl.Top = 100 e.Form.AddControl(lbl) next
|