Option Explicit
Private Sub Form_Load()
Dim c As ColumnHeader
Dim i As Integer
For i = 1 To 4
ListView1.ColumnHeaders.Add , , "Col " & i
Next i
ListView1.View = lvwReport
ImageList1.ListImages(1).Key = "Key1"
ListView1.ColumnHeaderIcons = ImageList1
ListView1.SmallIcons = ImageList1
For Each c In ListView1.ColumnHeaders
c.Icon = "Key1"
Next
Dim itemx As ListItem
Set itemx = ListView1.ListItems.Add(, , "test", , 1)
End Sub
For i = 0 To 4
.Col = i
.Row = 0
.CellBackColor = &H8000000F
.CellAlignment = 4
Next
.SelectionMode = flexSelectionByRow
.FixedRows = 0
.MergeCells = flexMergeRestrictRows
.MergeRow(0) = True
.ColWidth(0) = 300
.HighLight = flexHighlightAlways
For j = 1 To 4
.TextMatrix(j, 1) = Space(3) & "test" & Str(j)
Next
For j = 1 To 4
.Col = 1
.Row = j
Set .CellPicture = LoadPicture("c:\temp.bmp")
Next
End With
LastRow = 1
End Sub
Private Sub MSHFlexGrid1_Click()
With MSHFlexGrid1
If .Row = 0 Then Exit Sub
.TextMatrix(.Row, 0) = "★"
If LastRow <> .Row Then
.TextMatrix(LastRow, 0) = ""
LastRow = .Row
End If
End With