With FlexGrid1
            .Rows = 1
    
            .Cols = 3
    
            lngWidthUnit = FlexGrid1.Width \ 2
        
            .ColWidth(0) = 0.5 * lngWidthUnit
            .ColWidth(1) = 0.5 * lngWidthUnit
            .ColWidth(2) = 1 * lngWidthUnit
            
            .RowHeight(0) = 300
            .Font = "宋体"
我是不是可以通过修改 ..RowHeight(0)增加行值?

解决方案 »

  1.   

    不能。
    用。rows =  改变行值
      

  2.   


    Private Sub Command1_Click()
        With MSFlexGrid1
            .Rows = 9   '行数
            .Cols = 6   '列数
            .ColWidth(3) = 300  '列宽
            .RowHeight(5) = 500   '行高
        End With
        
    End Sub
      

  3.   

    .RowHeight(i)是行高;行数是Rows属性
      

  4.   


    Private Sub Command1_Click()
    With FlexGrid1
      .Rows = 3
      .Cols = 3
       
       lngWidthUnit = FlexGrid1.Width \ 2
       
      .ColWidth(-1) = 0.5 * lngWidthUnit
      .ColWidth(2) = 1 * lngWidthUnit
       
      .RowHeight(-1) = 500
      .RowHeight(0) = 800
      
      .Font = "宋体"
    End With
     
    End Sub
      

  5.   

    With FlexGrid1
      .Rows = 1'总共只有1行   
      .RowHeight(0) = 300'第1行的行高是300(缇)
      

  6.   

    With MSFlexGrid1
            .Rows = 9   '行数
            .Cols = 6   '列数
            .ColWidth(3) = 300  '列宽
            .RowHeight(5) = 500   '行高
        End With
    楼主到底问的是什么,行高?行数?
      

  7.   

    +  100行
    FlexGrid1.rows = FlexGrid1.rows + 100
      

  8.   

    使用Rows属性或AddItem方法,比如:
        '设置初始行列
        Me.MSHFlexGrid1.Rows = 2
        Me.MSHFlexGrid1.FixedRows = 1
        Me.MSHFlexGrid1.Cols = 3
        '设置标题行
        Me.MSHFlexGrid1.TextMatrix(0, 0) = "标题一"
        Me.MSHFlexGrid1.TextMatrix(0, 1) = "标题二"
        Me.MSHFlexGrid1.TextMatrix(0, 2) = "标题三"
        '设置第一行数据
        Me.MSHFlexGrid1.TextMatrix(1, 0) = "第一列"
        Me.MSHFlexGrid1.TextMatrix(1, 1) = "第二列"
        Me.MSHFlexGrid1.TextMatrix(1, 2) = "第三列"
        '增加一行
        Me.MSHFlexGrid1.Rows = Me.MSHFlexGrid1.Rows + 1
        Me.MSHFlexGrid1.TextMatrix(2, 0) = "第一列"
        Me.MSHFlexGrid1.TextMatrix(2, 1) = "第二列"
        Me.MSHFlexGrid1.TextMatrix(2, 2) = "第三列"
        '增加一行
        Me.MSHFlexGrid1.AddItem "第一列" & vbTab & "第二列" & vbTab & "第三列"