Dim t As Table = Tables("表A") Dim cs1 As C1.Win.C1FlexGrid.CellStyle = t.Grid.Styles.Add("样式1") cs1.TextAlign = 6 '0~11 Dim rgs = t.Grid.GetCellRange(t.RowSel+t.HeaderRows, t.ColSel + 1, t.BottomRow+t.HeaderRows, t.RightCol+1) rgs.style = cs1 '设置选中单元格的样式