动态增加控件时,如何控制每一行生成控件的个数?比如我想每行生成5个控件label,第六个就换到第二行,以此类推。。
‘-----------------这个代码是全部生成在一行的!!!!
Dim s1 As List(of String) = DataTables("A表").SQLGetValues("标一","[编号] = '" & bh.text & "' And [姓名] = '" & name.text & "'","操作时间")
For i As Integer=0 To 52 '列出全部
Dim txt As WinForm.label
txt = e.Form.CreateControl("label" & i, ControlTypeEnum.label)
txt.text = s1(i)
txt.Font = New Font("微软雅黑", 9)
txt.Left = 40 + 70*i
txt.Top = 30
txt.Width = "500"
txt.Height = "200"
Next
e.Form.Controls("Panel14").AddControl(txt)