Cell item text style
Cell item text style
Is it possible to set the text style for all the cells when inserting a new table
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Each table cell initially has one text item of the 0-th text and the 0th paragraph styles. You can delete it and replace to the text item of another style.
If you do not use RichViewActions, do it before calling rve.InsertItem.
If you use RichViewActions, add this cycle in rvActionInsertTable.OnInserting event.
If you do not use RichViewActions, do it before calling rve.InsertItem.
Code: Select all
table := TRVTableItemInfo.CreateEx(...);
// changing all cell styles to the current text and paragraph styles
for r := 0 to table.RowCount-1 do
for c := 0 to table.ColCount-1 do begin
table.Cells[r,c].Clear;
table.Cells[r,c].AddNL('', rve.CurTextStyleNo, rve.CurParaStyleNo);
end;
rve.InsertItem('', table);
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: