Is it possible to make a richview's background transparent?

General TRichView support forum. Please post your questions here
Post Reply
cryingfox
Posts: 1
Joined: Sun Oct 30, 2005 3:11 am

Is it possible to make a richview's background transparent?

Post by cryingfox »

There may be a panel blow. And I need the richview be transparent. How can I make it work this way?
Michel
Posts: 92
Joined: Fri Oct 14, 2005 2:56 pm
Contact:

Post by Michel »

Take a "snapshot" of whatever is behind RichView (the relevant portion of your panel) and use it as RichView's background image?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, transparency is not supported directly. One of possible solutions is suggested by Michel.

Another solution.
It may be useful if you create a kind of report including TRichView objects. Draw the document into a metafile and display this metafile instead of TRichViewEdit. If you need an inplace editing, place TRichViewEdit over this metafile when the user clicks at this area.

For drawing document into a metafile, see the demo Demos\Delphi\Assorted\Graphics\ToImage\.
Set RVReportHelper.TransparentBackground = True.
Post Reply