Merges two or more header cells.

Usage

Set_Property(OLECtrlEntID, "OLE.HeaderMerge[col; row]", Array)

Values

Array has the following structure:

PosNameTypeDescriptionDefault
<1>Columns to mergeIntegerThe number of columns to be merged with the cell (including the cell)1
<2>Rows to mergeIntegerThe number of rows to be merged with the cell (including the cell)1

Indices

IndexDescription
colIndex to an existing header column
rowIndex to an existing header row

Remarks

The HeaderMerge property merges a header cell with other header cells. To successfully merge header cells, you must understand a few concepts regarding cell merging. For any given set of merged cells, the top left most cell is referred to as the Master Cell and the other merged cells are Slave Cells. The Master Cell is the one whose attributes and text are visible, whereas the Slave Cells are effectively "hidden."

When merging header cells, the indices of this property refer to the cell that is to become a Master Cell of a merged set. The value indicates the size of the merged header cell in cell units. For example, to merge a header cell with the header cell next to it, you want to set the header cell's HeaderMerge property to 2:@FM:1. This is the same as saying that the header cell is now 2 cells wide and 1 cell tall.

* Merge header cell (1, 1) with the header cell next to it 
Set_Property(@Window:".OLE_EDITTABLE", "OLE.HeaderMerge[1; 1]", 2:@FM:1)

When reading the HeaderMerge property, you get different results from Slave Cells than from other cells. Non-Merged header cells always return 1:@FM:1. Master Cells always return the full dimensions of the merged set in cell units. Slave Cells always return negative values indicating the distance from itself to the master cell. For instance, in a 2x2 merged header cell, the bottom-right most header cell, which is a Slave Cell, will return -1:@FM:-1, because the Master Cell is one cell to the left and one cell above the Slave Cell.

See Also

CellMerge

  • No labels