Page 1 of 1

embedding custom content in a trichview document

Posted: Tue Jan 20, 2015 6:54 pm
by costa
Hello:

Could you please tell me if it is possible to embed a window in a document?

Let's say I want to place a grid or some other control, possible, a FireMonkey form. Is it doable? I would take care of serializing the embedded window data to/from the document, and of course of the display.

This would work much like the microsoft ole stuff that allows you to embed other documents or artifacts inside a document.

Thanks

Posted: Tue Jan 20, 2015 7:29 pm
by Sergey Tkachenko
You can insert a Delphi component in TRichView document, and this component can be saved with a document in RVF format (published properties are stored). For RTF, HTML and DocX you can write your own code for storing components, OnSaveComponentToFile event.
You can find examples in
Demos\DelphiUnicode\Tutorial\1 Building a Document\4 Controls
Demos\DelphiUnicode\Editors\Editor 1 ("Insert" menu).

However, TRichView is VCL component, and it supports insertion of VCL components, not FireMonkey.