Posted by webmaster Guido on March 24, 2008
In Reply to Re: printing a RichEdit box posted by RussCAp12602 on
March 21, 2008
: Another question is: Can I add graphics (.JPG, .BMP) to the RE box? Can I draw my own using Draw type commands? I've looked for a Canvas object but so far it has eluded me.
Sorry, you can not display images in a standard RichEdit, it's only for displaying formatted text.
There are some third party components available, but that's kind of problematic if you are using the free Turbo Delphi Explorer, since it doesn't allow you to add components to its component palette.
The easiest solution: upgrade to the paying Turbo Delphi version (about $400) and next obtain a cheap or free add-on enhanced component (TRxRichEdit, TPrintPreview,...)
More time consuming: obtain an add-on enhanced component that has its *source code* included; don't install it in Delphi's palette, but include its unit (*.PAS file) in your project. Now, in the OnCreate event of your project's main form, you can create yourself a component from this unit.
I didn't find any source code examples, but if this last solution does interest you, we could do some development & testing :)