Dim tab1 As WinForm.TabControl
tab1 = e.Form.CreateControl("tab1", ControlTypeEnum.TabControl)
e.Form.Controls("P1").addcontrol(tab1)
tab1.Dock = System.Windows.Forms.DockStyle.fill
tab1.Font = fnt
Dim x As Integer
Dim str As String
Dim pan As WinForm.Panel
str = "test"
tab1.TabPages.Add(str, str)
pan = e.Form.CreateControl("pan" & str, ControlTypeEnum.panel)
pan.Dock = System.Windows.Forms.DockStyle.fill
pan.AutoScroll = True
pan.BackColor = color.Silver
e.Form.Controls("tab1").basecontrol.tabpages(str).addcontrol(pan)
Dim t As WinForm.Table
t = e.Form.CreateControl("t123", ControlTypeEnum.Table)
e.Form.Controls("pantest").addcontrol(t)
到红色备份就报错 想实现的效果是在每个tabpage里添加一个表控件 然后再绑定sql语句