For Each c As WinForm.Control In e.Form.Controls
If Typeof c Is WinForm.Table Then '判断控件是否是文本框
Dim dt As WinForm.Table = c '使用特定类型的变量引用控件
dt.Table.ListMode = True '突出选定行
'MessageBox.Show(1)
dt.Font = New Font("宋体",9,FontStyle.Regular)
dt.Table.Grid.Styles("Normal").Border.Color = Color.DeepSkyBlue '当前表格边线色
dt.Table.DataTable.SysStyles("CurrentRow").BackColor = Color.DeepSkyBlue
dt.Table.DataTable.SysStyles("EmptyArea").BackColor = Color.White '当前表空白区背景色
dt.Table.Cols.TextAlign = TextAlignEnum.Center '当前表数据居中
dt.Table.Cols.TextAlignFixed = TextAlignEnum.Center '当前表标题居中
'MessageBox.Show(2)
dt.Table.ExtendLastCol = True '当前表自动调整列宽
'Tables("订单").Cols("数量").Width = 150 '当前表指定列的宽度
'MessageBox.Show(3)
dt.Table.DefaultRowHeight = 25 '当前表自动固定行高
'MessageBox.Show(4)
End If
Next