With Tables("主窗口_Table1")
.DataSource = dt4
.Cols.Remove("发布机构","发布部门","类别","主题","通知部门","内容","登记状态","登记人","登记日期","备注")
.DefaultRowHeight = 25 \'所有行高
.Cols("发布日期").TextAlign = TextAlignEnum.Center \'发布日期列数据居中
.grid.ScrollBars = 0 \'禁止滚动条,0 无 1 横向 2 纵向 3 横向纵向
.S elect(-1,-1) \'移除焦点行
.Theme = "(none)" \'清除表样式
.grid.rows(0).height = 0 \'隐藏表头
.grid.styles.Normal.Border.Color = Color.WhiteSmoke \'表格线颜色
.grid.styles.Normal.Border.Style = 1 \'1为单线,2为双线
.grid.styles.Normal.Border.width = 0.6 \'表格线宽
.grid.styles.Normal.Border.Direction = 1 \'0为横竖线,1为横,2为竖
.grid.Styles("EmptyArea").Border.Color = Color.FromARGB(255,255,255) \'Transparent \'表格边框颜色
.DataTable.SysStyles("Focus").ForeColor = Color.Red \'焦点单元格字体颜色
\'.DataTable.SysStyles("CurrentRow").ForeColor = Color.Red \'当前行字体颜色
.DataTable.SysStyles("EmptyArea").BackColor = Color.White \'空白区背景色
.DataTable.SysStyles("Focus").BackColor = Color.FromARGB(255,255,255) \'焦点单元格背景颜色
.DataTable.SysStyles("CurrentRow").BackColor = Color.FromARGB(255,255,255) \'当前行背景颜色
End With
我的出来是这个效果
此主题相关图片如下:qq截图20240313104617.jpg