MTblSetRowMerge

Functions ›› MTblSet... ›› MTblSetRow... ››
Parent Previous Next

bOk = MTblSetRowMerge( hWndTbl, nRow, nMergedRows, nFlags )

Merges a row with a certain number of  rows below.

Parameters
hWndTbl
Window Handle: Handle of the table

nRow
Number: Row number

nMergedRows
Number: Number of rows to merge

nFlags
Number: Any combination of the following flags:

MTSM_INS_DEL_ROWS

Rows are inserted and/or deleted automatically

MTSM_NO_CELLMERGE

The cells are not automatically merged

MTSM_REDRAW

Redraws the affected rows

Return
Boolean: TRUE if successful or FALSE if an error occurs

Example
In this example 5 rows are merged with row 0:

Call MTblSetRowMerge( hWndTbl, 0, 5, MTSM_REDRAW )

Remarks
If the flag MTSM_INS_DEL_ROWS is set, rows are inserted and/or deleted automatically according to the following rules:
If the new number of merged rows is greater than the current number of merged rows, needed rows are inserted. The number of inserted rows is equal to the difference between the current and new number of merged rows.
If the new number of merged rows is less than the current number of merged rows, needless rows are deleted (with TBL_NoAdjust). The number of deleted rows is equal to the difference between the current and new number of merged rows.

If the flag MTSM_NO_CELLMERGE is not set, for each column the cells are automatically merged according to the following rules:
If merged cells are beginning at the first row or ending at the last row, the merged cells are increased by the difference between the new and old number of merged rows. If the new number of merged rows is less than the old one, the merged cells are decreased respectively.
If no merged cells are overlapping the merged rows, the cells are merged according to the number of merged rows.


See also
Row merging
Cell merging

Created with the Personal Edition of HelpNDoc: Write eBooks for the Kindle