以下是引用桃花笑在2018/5/23 9:16:00的发言:
如果有一个listbox,有100条数据,想将50条数据放在一个listbox1,宁外50条数据放在宁外的listbox2中,
这个有办法么
Dim ls = DataTables("表A").GetValues("中类")
Dim lsb As WinForm.ListBox = e.Form.Controls("ListBox1")
For i As Integer = 0 To ls.count / 2 - 1
lsb.Items.Add(ls(i))
Next
Dim lsb2 As WinForm.ListBox = e.Form.Controls("ListBox2")
For i As Integer = ls.count / 2 To ls.count-1
lsb2.Items.Add(ls(i))
Next