Page 1 of 1
How to unite cells?
Posted: Tue Aug 03, 2010 7:34 pm
by Roman2807
How to unite cells in the table?
Posted: Tue Aug 03, 2010 8:31 pm
by Sergey Tkachenko
1) If you want to write code yourself.
table.MergeCells (usually used before the table is inserted in the editor)
table.MergeSelectedCells (merging selected cells).
Because of merging, empty (containing only of nil-cells) rows or colums may appear, so call table.DeleteEmptyRows and table.DeleteEmptyCols after.
If the table is already inserted in the editor, you need to call these methods between rve.BeginItemModify...rve.EndItemModify, then call rve.Change.
Examples can be found in the demo Editors\Editor 1\:
- TForm1.mitInsertTable1Click, TForm1.mitInsertTable2Click insert sample tables with merged cells;
- TForm1.mitCellsOperationClick implements table operations, including cell merging.
2) If you use RichViewActions, you can use TrvActionTableMergeCells to merge selected cells, without writing any code.