以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 如何动态增加表控件? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=194630) |
-- 作者:rjh4078 -- 发布时间:2024/12/30 13:30:00 -- 如何动态增加表控件? 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语句
|
-- 作者:有点蓝 -- 发布时间:2024/12/30 13:32:00 -- http://www.foxtable.com/webhelp/topics/1919.htm |