Load RVF into table cells

General TRichView support forum. Please post your questions here
Post Reply
martindholmes
Posts: 131
Joined: Mon Aug 29, 2005 12:03 pm

Load RVF into table cells

Post by martindholmes »

I'm trying to load RVF from a stream into table cells, but the method (LoadRVFFromStream) seems to have a lot of parameters which aren't documented in the help file, such as Color, Background and Layout. Could you explain what these are, or give an example of how to load RVF from a stream into an empty table cell in a TRichViewEdit?

Cheers,
Martin
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Pass any TColor value and two nils as additional parameters.
But there is a problem: cells do not support merging style collections.
That means that:
1) RVF file must have the same collection of styles as TRVStyle used by TRichView containing the table
2) RVFTextStylesReadMode and RVFParaStylesReadMode properties of this TRichView must be set to rvf_sIgnore before loading RVF into cell.

This problem can be solved by loading RVF in a hidden TRichView linked to the same RVStyle, then copying from this TRichView to cell. Example can be found in Demos\Delphi\Assorted\Fields\MailMerge2 demo
martindholmes
Posts: 131
Joined: Mon Aug 29, 2005 12:03 pm

Post by martindholmes »

Thanks!

This table stuff is actually one of the solutions I'm looking at for getting around the import of a set of little documents as a numbered list. I'm trying to use a table with no borders to fake the hanging indent :-).
martindholmes
Posts: 131
Joined: Mon Aug 29, 2005 12:03 pm

Post by martindholmes »

I seem to have a working solution to this, explained here:

http://www.trichview.com/forums/viewtop ... =8874#8874

(Not a solution to the table cell problem; it's a solution to the issue I was trying to solve with tables, but which is better solved using paragraph formatting.)
Post Reply