Page 1 of 1

How can I insert a OLE Object in TRichviewedit?

Posted: Wed May 10, 2006 3:59 am
by sky_234
To Sergey
How can I insert a OLE Object in TRichviewedit? I found the TRichviewedit has some evevt(as OnOleDragEnter...), if use those event to realize insert OLEObject?
In addition, If have better method to realize insert OLE Object?

Posted: Wed May 10, 2006 5:46 am
by MLefebvre
You can use a TOleContainer, and simply insert it with method InsertControl. A few extra things to be done to handle resizing properly, but basically, it works. I beleive that there is a demo that shows all that.

Posted: Mon May 15, 2006 2:21 pm
by Sergey Tkachenko
The example can be found in Demos\Delphi\Editors\Editor 1\

OLE objects are inserted from the Clipboard (Edit | Paste As | OLE).
Search for "OLE" in the source code of this demo to find all code related to OLE objects.