I generate a table in code and then want to merge the entire top row. I tried:
par := wpRichText.TableAdd(numCols, numRows, [wptblActivateBorders], nil, CallBack); for i := 0 to par.TableRow.ColCount-2 do par.TableRow.Cols[i].MergeCell(true);
however the tableAdd function does not return the table Paragraph but some other paragraph. Therefore I tried:
wpRichText.BeginTable('TABLE', 0, 0, 0);
wpRichText.TableAdd(numCols, numRows, [wptblActivateBorders], nil, CallBack);
if wpRichText.MoveToCell(0,0,'TABLE') then
for i := 0 to wpRichText.TableRow.ColCount-2 do
wpRichText.TableRow.Cols[i].MergeCell(true);
wpRichText.EndTable;
But that also doesn't merge the table columns in the first row
Any suggestions?
#1
♥ 0