Dim tb As Table = e.Form.Controls("Table1").Table
'-------主题设置-------------------------------------------------------------------------------------
Dim zhut As Integer =getConfigValue("zhut",2)
For Each c As object In e.Form.Controls
If c.Gettype.Name="combobox" Or c.Gettype.name="DateTimePicker" Or c.Gettype.name="DropDownBox" Or c.Gettype.name="TextBox" Then
c.basecontrol.VisualStyle = zhut
c.backcolor=Color.white
End If
Next
'e.Form.Controls("TabControl1").basecontrol.VisualStyle =zhut
'e.Form.Controls("Table1").basecontrol.VisualStyle=1
BuildCaption(tb) '重建表标题
SetVisibleWidth(tb) '设置列宽
tb.ListMode = True '突出显示选定行
tb.ExtendLastCol = True '调整最后一列以适应表宽
tb.LeftVisibleCol = 0 '第一个可见列位置
SetSenserColumn(tb)
tb.AllowDelete = False '是否允许用户在Table中删除行,可根据表的性质来确定
tb.Select
'-------树目录---------------------------------------------------------------------------------------
Dim btn刷新树 As WinForm.Button = e.Form.Controls("btn刷新树")
btn刷新树.PerformClick '模拟单击
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim Label表标题 As WinForm.Label = e.Form.Controls("Label表标题")
Dim lbl树节点 As WinForm.Label = e.Form.Controls("lbl树节点")
Dim lbl表标题 As WinForm.Label = e.Form.Controls("lbl表标题")
'Dim Font1 As font = Label表标题.font
lbl树节点.text = Label表标题.text & zfc3
'lbl树节点.Font = Font1
Label表标题.text = lbl树节点.text & trv.SelectedNode.FullPath
'-------筛选-----------------------------------------------------------------------------------------
Dim cmbCols As WinForm.ComboBox = e.Form.Controls("cmbCols")
cmbCols.AllowEditValue = False
cmbCols.Items.Clear
For Each dc As Col In tb.Cols
If dc.Visible=True Then
cmbCols.Items.Add(dc.Name)
End If
Next
e.Form.Controls("lbl筛选条件").text = ""