如何将选中的MSHFlexGrid 一行高亮显示 高亮显示要设置颜色 Private Sub hflexgrid_EnterCell() '单击某一单元时,改变该行颜色 Dim i_Col As Integer Dim c_col As Integer c_col = Hflexgrid
col If c_col > 0 Then For i_Col = 0 To Hflexgrid
Cols - 1 Hflexgrid
col = i_Col Hflexgrid
CellBackColor = &HFFFFC0 Next i_Col Hflexgrid
col = c_col End If End Sub Private Sub hflexgrid_LeaveCell() '当某一行失去焦点时,恢复该行颜色 Dim i_Col As Integer Dim c_col As Integer c_col = Hflexgrid
col For i_Col = 0 To Hflexgrid
Cols - 1 Hflexgrid
col = i_Col Hflexgrid
CellBackColor = vbWhite Next i_Col Hflexgrid
col = c_col End Sub mshflexgrid 怎么改变某一行的背景色和字体颜色
Private Sub setColor(msfg As MSFlexGrid, row As Long, color As Long, bkcolor As Long) For i = 1 To msfg
Cols - 1 msfg
row = row msfg
Col = i msfg
CellForeColor = color '前景色 msfg
CellBackColor = bkco