如何在运行时设置MSHFlexGrid控件的每个单元格的宽度和高度?

解决方案 »

  1.   

    Private Sub Command1_Click()
    Me.MSFlexGrid1.ColWidth(0) = 2000
    Me.MSFlexGrid1.RowHeight(0) = 300
    End Sub
      

  2.   

    调用下面过程也可以:
    Private Sub SetColumnAndRow()
        With MSFlexGrid1
            .ColWidth(0) = 800
            .ColWidth(1) = 800
            .RowHeight(0) = 300
                      
        End With
    End Sub
      

  3.   

    好像两个都不可以,不过在属性里可以定义Fromatstring ="^   列标题1  |^  列标题2   "