高手们:怎样使MSHFlexGrid控件每行显示一条横线,不显示竖线?在线等

解决方案 »

  1.   

    用这个函数给你的flexgrid绘制灰白间条
    public sub FlexB(grid as mshflexgrid)
    dim i ,j as integer
    with grid
         .SelectionMode = flexSelectionByRow
         .HighLight = flexHighlightAlways
         .GridLines = flexGridNone
         .Redraw = False
    For i = .FixedRows To .Rows - 1 Step 2
        .row = i
        For j = .FixedCols To .Cols - 1
           .col = j
           .CellBackColor = RGB(255, 255, 255)
        Next 
    Next 
    For i = .FixedRows + 1 To .Rows - 1 Step 2
        .row = i
        For j = .FixedCols To .Cols - 1
             .col = j
             .CellBackColor = RGB(223, 223, 223)
        Next 
    Next 
           .Redraw = True
    end with
    end sub
      

  2.   

    自己做一个控件吧,我也不喜欢那个MSHFlexGrid,可能我用的VB版本不高吧