Hello,
I'm trying to copy-paste a table from Word where some cells have borders.
I'm using the latest RichViewActions demo from web site.
If the borders are inside the table (meaning between two cells) then RichViewActions displays them correctly.
But if the borders are for outmost cells (meaning no cell on the other side) then RichViewActions draws a full table border instead of just for that particular cell.
Please advise.
Issue with table cell borders
Issue with table cell borders
- Attachments
-
- OutsideCellBorderIssue.png (111.75 KiB) Viewed 16889 times
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Issue with table cell borders
I need some time to check this problem and see if it can be solved.
In RTF tables, each cell may have completely different border at each side. In TRichView, all cells have identical borders (but some sides can be hidden). When importing RTF tables, outer borders are emulated by combination of cell border + table border. For example, if internal borders have 1 pixel width, and external borders have 2 pixel width, it will be imported as CellBorderWidth = 1 and table BorderWidth = 1 (because 1+1 = 2).
Probably, TRichView decided that for this table CellBorderWidth = 0 and table BorderWidth = 1, so it draws a border around the whole table.
I'll see if such tables can be imported differently.
In RTF tables, each cell may have completely different border at each side. In TRichView, all cells have identical borders (but some sides can be hidden). When importing RTF tables, outer borders are emulated by combination of cell border + table border. For example, if internal borders have 1 pixel width, and external borders have 2 pixel width, it will be imported as CellBorderWidth = 1 and table BorderWidth = 1 (because 1+1 = 2).
Probably, TRichView decided that for this table CellBorderWidth = 0 and table BorderWidth = 1, so it draws a border around the whole table.
I'll see if such tables can be imported differently.
Re: Issue with table cell borders
This issue seems to have started since TRichView started differentiating between inner cell borders (CellBorderWidth) and outermost cells (OutermostCellBorderWidth).
The OutermostCellBorderWidth is later added to table BorderWidth and thus if there is at least one outermost cell with a border the entire table border is painted (as seen on the example).
The OutermostCellBorderWidth is later added to table BorderWidth and thus if there is at least one outermost cell with a border the entire table border is painted (as seen on the example).
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Issue with table cell borders
I fixed it in my working version.
The fix will be included in the next update (I hope it will be released in the next week)
The fix will be included in the next update (I hope it will be released in the next week)