If Tables("配色表").RowSel < 0 OrElse Tables("配色表").ColSel < 0 Then
e.cancel=True
End If
If vars("stop") = True Then Return
If ModifierKey <> Keys.Control Then
For Each p As String In pscm1
If p >= 0 Then
For i As Integer = 1 To e.Table.Cols.count
e.Table.Grid.SetCellStyle(p+1, i, "")
Next
End If
Next
pscm1.clear
End If
For i As Integer = e.NewRange.TopRow To e.NewRange.BottomRow
Dim p As String = i
If i >= 0 AndAlso pscm1.contains(p) = False Then
pscm1.add(p)
End If
Next
For Each p As String In pscm1
If p >= 0 Then
Dim s As C1.Win.C1FlexGrid.CellStyle = e.Table.grid.Styles.Add("selected")
s.backcolor = Color.red '背景
For i As Integer = 1 To e.Table.Cols.count
e.Table.Grid.SetCellStyle(p+1, i, s)
Next
e.Table.DataTable.SysStyles("Focus").BackColor = Color.red
End If
Next
这是什么原因呢?