有没有什么控件或者方法可以实现分行显示的数据,用不同颜色作为文字的背景

解决方案 »

  1.   

    用MsHFlexGrid
    代码如下:    With MSHFlexGrid1        .Redraw = False
            ' 设置网格列宽度
            .ColWidth(0) = -1
            .ColWidth(1) = -1
            .ColWidth(2) = -1
            .ColWidth(3) = -1        ' 设置网格样式
            .AllowBigSelection = True
            .FillStyle = flexFillRepeat        ' 将标头作成粗体
            .Row = 0
            .Col = 0
            .RowSel = .FixedRows - 1
            .ColSel = .Cols - 1
            .CellFontBold = True        ' 隔行变灰
            For i = .FixedRows + 1 To .Rows - 1 Step 2
                .Row = i
                .Col = .FixedCols
                .ColSel = .Cols() - .FixedCols - 1
                .CellBackColor = &HC0C0C0   ' 浅灰
            Next i        .AllowBigSelection = False
            .FillStyle = flexFillSingle
            .Redraw = True    End With