Type | Description | |||
Item as Variant | A long expression that indicates the item's handle. | |||
ColIndex as Variant | A long expression that indicates the column's index, a string expression that indicates the column's caption or the column's key. | |||
Variant | A long expression that indicates the index of the cell that's merged with, a safe array that holds the indexes of the cells being merged. |
The following sample shows few methods to unmerge cells:
With ExplorerTree1.Groups(0) With .Items .UnmergeCells .ItemCell(.RootItem(0), 0) End With End With
With ExplorerTree1.Groups(0) With .Items Dim r As Long r = .RootItem(0) .UnmergeCells Array(.ItemCell(r, 0), .ItemCell(r, 1)) End With End With
With ExplorerTree1.Groups(0) .BeginUpdate With .Items .CellMerge(.RootItem(0), 0) = -1 .CellMerge(.RootItem(0), 1) = -1 .CellMerge(.RootItem(0), 2) = -1 End With .EndUpdate End With
You can merge the first three cells in the root item using any of the following methods:
With ExplorerTree1.Groups(0) With .Items .CellMerge(.RootItem(0), 0) = Array(1, 2) End With End With
With ExplorerTree1.Groups(0) .BeginUpdate With .Items Dim r As Long r = .RootItem(0) .CellMerge(r, 0) = 1 .CellMerge(r, 0) = 2 End With .EndUpdate End With
With ExplorerTree1.Groups(0) .BeginUpdate With .Items Dim r As Long r = .RootItem(0) .MergeCells .ItemCell(r, 0), .ItemCell(r, 1) .MergeCells .ItemCell(r, 0), .ItemCell(r, 2) End With .EndUpdate End With
With ExplorerTree1.Groups(0) With .Items Dim r As Long r = .RootItem(0) .MergeCells .ItemCell(r, 0), Array(.ItemCell(r, 1), .ItemCell(r, 2)) End With End With
With ExplorerTree1.Groups(0) With .Items Dim r As Long r = .RootItem(0) .MergeCells Array(.ItemCell(r, 0), .ItemCell(r, 1), .ItemCell(r, 2)) End With End With