Page 1 of 1

table gridlines are allways visible

Posted: Tue Aug 09, 2022 12:58 pm
by a.weber
Hello,
loading a docx with a blind table -- all borders hidden in word - but in RichViewEdit the borders are visible als 1px black solid lines.
I have tried the following options but without luck:

Options - [rvoShowGridLines]
RTFReadProperties.AutoHideTableGridLines = true

I saved the docx as rtf and loaded this there it works - the gridlines are not visible. So I think it's a bug in loading docx?

with best regards
A. Weber

Re: table gridlines are allways visible

Posted: Wed Aug 10, 2022 9:28 am
by Sergey Tkachenko
There are two options for hiding grid lines.

The first option is rvoShowGridLines in RichView.Options. It works globally for all tables in RichView.
Note that changing this option does not repaint the current document, call RichView.FullInvalidate to repaint after including or excluding this option.
This option is for TRichView, not for documents, so it is not saved to and is not loaded from files.

The second option is rvtoHideGridLines in Table.Options. It works only for this table, and allows to hide grid lines in this table even if rvoShowGridLines is in RichView.Options.
Note that changing this option does not repaint the current document, call RichView.FullInvalidate to repaint after including or excluding this option
This option can be saved and loaded only in RVF format.
If you assign AutoHideTableGridLines = True, this option will be set for all tables loaded from RTF and DocX. But this option is not saved to and not loaded from RTF and DocX.

As for me, I do not recommend to use Table.Options for this purpose. I believe that RichView.Options is enough.
RichViewActions' TrvActionTableGrid changes rvoShowGridLines in RichView.Options, and cannot change a per-table option.

Re: table gridlines are allways visible

Posted: Wed Aug 10, 2022 10:35 am
by a.weber
Hello,
There are two options for hiding grid lines.
I have tried both options - but none of them worked - I changed the options at designtime in Object inspektor - so FullInvalidate wouldn't change anything.
The problem is it depends from where I loaded the document - if I load it from "rtf" it works like expected. If i load it from "docx" the borders are allways visible as 1px black solid lines.

First try:
Options.rvoShowGridLines := true;
RTFReadProperties.AutoHideTableGridLindes := false;

Loaded from RTF:
table-rtf-ok.png
table-rtf-ok.png (25.09 KiB) Viewed 9372 times
it shows just the gray dotted line - like set in rvStyle component.

Loaded from DOCX:
table-docx-wrong.png
table-docx-wrong.png (25.17 KiB) Viewed 9372 times
it shows me a 1px black solid line

Second try
Options.rvoShowGridLines := false;
RTFReadProperties.AutoHideTableGridLindes := true;
Loaded from RTF:
table-rtf-ok2.png
table-rtf-ok2.png (22.93 KiB) Viewed 9372 times
like expected no borders visible.

Loaded from DOCX:
table-docx-wrong2.png
table-docx-wrong2.png (22.64 KiB) Viewed 9372 times
borders still there like in first try...

Re: table gridlines are allways visible

Posted: Wed Aug 10, 2022 12:02 pm
by Sergey Tkachenko
These options work only for displaying lines in place of hidden or zero-width table/cell borders.
It does not affect displaying visible borders.
I'll check what's wrong with these files in the next couple of days.

Re: table gridlines are allways visible

Posted: Wed Aug 10, 2022 1:17 pm
by a.weber
ok. thank you

Re: table gridlines are allways visible

Posted: Mon Aug 15, 2022 6:04 pm
by Sergey Tkachenko
Well, there is a bug in DocX reading: table cell properties specified in table style (in this case, single border) are used instead of cell properties defined in the table itself (in this case, no borders).
It will be fixed in the next update. Let me know if you need this fix urgently.

Re: table gridlines are allways visible

Posted: Tue Aug 16, 2022 1:04 pm
by a.weber
Hello Sergey,
depends on your release schedule - if the next release is within the next three months it would be fine. So long we we can work with RTF instead of docx for our formated mails.

André

Re: table gridlines are allways visible

Posted: Thu Aug 18, 2022 4:57 pm
by Sergey Tkachenko
I sent the fixed unit to you in a private message.