How can I insert a OLE Object in TRichviewedit?

General TRichView support forum. Please post your questions here
Post Reply
sky_234
Posts: 24
Joined: Sat Feb 18, 2006 1:27 pm

How can I insert a OLE Object in TRichviewedit?

Post 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?
MLefebvre
Posts: 191
Joined: Mon Aug 29, 2005 4:28 pm
Location: France
Contact:

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Post Reply