现在窗体上加载2个PictureBox,里面分别装在表示【选中】和【未选中】的图标
Private Sub Form_Load()
Dim i As Long
Picture1.Visible = False'图标不可见
Picture2.Visible = False'图标不可见
With MSHFlexGrid1
.Rows = 1000
.Cols = 4
.RowHeight(-1) = 280
.ColAlignment(0) = flexAlignCenterCenter
For i = 1 To .Rows - 1
.TextMatrix(i, 0) = CStr(i)
Next i
.ColWidth(1) = 800
.FillStyle = flexFillRepeat
' .Col = 0 '1
' .RowSel = 0 '1
' .Rows = .Rows - 1
' .CellPictureAlignment = flexAlignCenterCenter
' Set .CellPicture = Picture2.Picture
' .RowSel = 1
' .FillStyle = flexFillRepeat
End With
End Sub
Private Sub MSHFlexGrid1_Click()
With MSHFlexGrid1
.ColWidth(3) = 1600
If .MouseCol = 1 And .Col = 1 Then
.RowData(.MouseRow) = Not .RowData(.MouseRow)
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载