|
用VSFlexGrid控件
它的帮助文档的示例
Private Sub Form_Load()
Dim i%
' initialize control
fg.WordWrap = True
fg.Cols = 9
fg.FixedRows = 2
fg.MergeCells = flexMergeFixedOnly
' create row headers
fg.MergeRow(0) = True
' four cells, will merge
fg.Cell(flexcpText, 0, 1, 0, 4) = "North"
' four cells, will merge
fg.Cell(flexcpText, 0, 5, 0, 8) = "South"
For i = 1 To 4
fg.Cell(flexcpText, 1, i, 1) = "Qtr " & i
fg.Cell(flexcpText, 1, i + 3, 1) = "Qtr " & i
Next
' create column header
fg.MergeCol(0) = True
' two cells, will merge
fg.Cell(flexcpText, 0, 0, 1, 0) = "Sales by " & _ "Product"
' align and autosize the cells
fg.Cell(flexcpAlignment, 0, 0, 1, fg.Cols - 1) _ = flexAlignCenterCenter
fg.AutoSize 1, fg.Cols - 1, False, 300
End Sub
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|