Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
ExistControl(Name)
它返回的逻辑值是什么样的呢?
代码如下
If e.Form.ExistControl("Table1")=0 Then
Dim tbl As WinForm.Table
tbl = e.Form.CreateTable("Table1", "销售订单", True)
tbl.SetBounds(6, 330, 663, 250)
e.Form.Controls("SplitContainer1").Panel2.AddControl(tbl)
Tables("销售订单").AddNew()
Else
Tables("销售订单").DataTable.Load(False)
e.Form.Controls("SplitContainer1").Panel2.removeControl("Table1")
Dim tbl As WinForm.Table
tbl = e.Form.CreateTable("Table1", "销售订单", True)
tbl.SetBounds(6, 330, 663, 250)
e.Form.Controls("SplitContainer1").Panel2.AddControl(tbl)
Tables("销售订单").AddNew()
End If
If e.Form.ExistControl("Table1")=False Then
Dim tbl As WinForm.Table
tbl = e.Form.CreateTable("Table1", "销售订单", True)
tbl.SetBounds(6, 330, 663, 250)
e.Form.Controls("SplitContainer1").Panel2.AddControl(tbl)
End If
Tables("窗口名_Table1").AddNew()
你那个Else 后面是什么意思?
把表删除掉在加载?加载到哪里?这样的话还要动态再添加表,何不直接条件加载即可!