如题,谢谢了

解决方案 »

  1.   

    好像没有这个功能,如果实在要加的话就使用checkbox放在一个表格里面如果你换一个空件 vsflexgrid只要设置好属性就能增加 checkbox功能
      

  2.   

    这其实真的很简单~ 但别人也要上班,没时间帮你从头写到尾,还给你调试实际上,就是拖一个checkbox上去,然后move到和MSFlexGrid某个cell重叠就可以了~
      

  3.   

    Private Sub Form_Load()
        Dim i As Long
        With MSFlexGrid1
            .Rows = 10000
            .RowHeight(-1) = 280
            .ColAlignment(0) = flexAlignCenterCenter
            For i = 1 To .Rows - 1
                .TextMatrix(i, 0) = CStr(i)
            Next
            
            .ColWidth(1) = 800
            .FillStyle = flexFillRepeat
            .Col = 1
            .RowSel = 1
            .RowSel = .Rows - 1
            .CellPictureAlignment = flexAlignCenterCenter
            Set .CellPicture = Picture2.Picture
            
            .RowSel = 1
            .FillStyle = flexFillSingle
        End With
    End Sub
    Private Sub MSFlexGrid1_Click()
        With MSFlexGrid1
            If .MouseCol = 1 And .Col = 1 Then
                .RowData(.MouseRow) = Not .RowData(.MouseRow)
                If .RowData(.MouseRow) Then
                    Set .CellPicture = Picture1.Picture
                Else
                    Set .CellPicture = Picture2.Picture
                End If
            End If
        End With
    End SubPicture1和Picture1是两个图片框,放了两个图片,分别是checkbox选中和未选中的样子
    给我邮箱,我把源码发给你
      

  4.   

    可以根据RowData属性判断某行是否被选中了
      

  5.   

    呵呵,对于会的人肯定很简单,但是不会的人绝对难于登天。
    请问您,怎样实现您所说的“move到和MSFlexGrid某个cell重叠”这样的功能?
    如果您有空,还请上传给我们这些菜鸟学习,谢谢!
      

  6.   


    我想要您的源代码,
    请发到我邮箱,谢谢!
    [email protected]
      

  7.   

    发过来,我也要参考一下哟,[email protected]
      

  8.   

    用vsflexgrid吧,实现起来相当简单