How to unite cells?
How to unite cells?
How to unite cells in the table?
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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.
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.