Page 1 of 1

Displaying a document to directly to a canvas?

Posted: Thu Sep 08, 2005 1:34 pm
by andyastrand
Very interested in using the TRichViewEdit controls to allow formatted text to be entered for a large number of fields for certain database items.

Now some of these pieces of formatted text will need to be displayed in some custom controls that I'm knocking up. Columnular Tables and To Do Lists being two examples.

I would have thought that at some point the TRichView* components are passing their canvas and the document to be displayed along with some positioning information to a rendering engine of some sort.

Without changing the TRichView source code is it possible for my custom controls to access this or achieve the equivalent? As I would much rather do it this way than have to create a TRichView control for every cell in the table or have one which I sequentially point at a different document and try and rip the canvas from it.

I haven't been able to find anything in the help on this matter but then that doesn't necessarily suprise me.

Any help / pointers / reassurances that could be given would be greatly appreciated.

Posted: Thu Sep 08, 2005 5:10 pm
by DelphiLove
Sounds like you should be using TRVReportHelper

Posted: Thu Sep 08, 2005 8:25 pm
by Sergey Tkachenko
Yes, you need TRVReportHelper.

Examples can be found in TRichView demos (Demos\Delphi\)

Example how to draw TRichView in image:
Assorted\Graphics\ToImage\

Example how to draw in TDBGrid:
DB Demo\3 DBGrid\

As I understand, the last example is almost exactly what you need.