如下用代码增加的表,我想做到有Ctrl+D功能,这个代码要写在那里?
Dim tb As Table = CurrentTable
Dim r As Row = tb.Current
If r Is Nothing Then Return
If r("i") = "+" OrElse r("i") = "--" Then
Dim tab As WinForm.TabControl = e.Form.Controls("TabControl1")
Dim id As Integer = tab.TabPages.Count
' Dim tbn As String = "TabMc" & id
Dim tbn As String = "TabMc" & Format(Functions.Execute("返回服务器日期"),"HHmmss")
tab.TabPages.Add(Tbn,r("名称"))
tab.SelectedIndex = id
Dim CVS As String = tb.GetColVisibleWidth
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~?
If e.form.controls.contains(tbn) Then
MessageBox.Show("移除")
e.form.RemoveControl(tbn)
End If
Dim tbl As WinForm.Table
tbl = e.Form.CreateSQLTable(tbn ,"Sele ct * Fro m {BOM} where 父阶代码 = '" & r("子阶代码") & "'", "ksg")
tbl.Dock = 5
e.Form.Controls("TabControl1").Tabpages(id).AddControl(tbl)
tbl.ContextStrip = e.Form.Strips("快捷菜单1")
tbl.Table.SetColVisibl eWidth("i|16|序号|34|子阶代码|158|名称|195|规格型号|244|单位|34|用量|47|选用料|47|车间|34|组别|47|替换料|47|默认仓库名称|84")
tbl.Table.Sort = "序号"
tbl.Table.Cols("子阶代码").DropForm = "物料表查找下拉"
End If