MyCloseButtonPreviewPlugin
I downloaded the file:
http://www.digital-metaphors.com/tips/myCloseButtonPreviewPlugin.zip
This works great. However, it would be very helpful if you could
explain how the plugin works. The only reference I can find to it is
in the project file. How does that cause it to become effective in
all my reports.
Thanks, Sidney
http://www.digital-metaphors.com/tips/myCloseButtonPreviewPlugin.zip
This works great. However, it would be very helpful if you could
explain how the plugin works. The only reference I can find to it is
in the project file. How does that cause it to become effective in
all my reports.
Thanks, Sidney
This discussion has been closed.
Comments
TppCustomPreview descendent. It will be used in all of your reports as long
as it is registered. You can use the default by unregistering yours and
registering the default again.
You don't need to create your own TppPrintPreview object, as the preview
plugin (TppPreview) is what you need to replace. You should only have to
call Report.Print in order for the plugin to be used to preview.
The preview plugin architecture exists in order to allow you to replace the
preview form in the preview tab of the end user designer.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
a registration scheme. Look in the TppPrintPreview.FormCreate and in the
TppDesignerWindow.Create (ppPrvDlg.pas and ppDsgner.pas) methods and you'll
find:
FPreview := TppPreviewPlugIn.CreateInstance(Self);
See ppPreview.pas for the TppPreviewPlugIn class which provides the
register/unregister mechanism.
The FPreview object is used to connect the viewer object up in the designer.
The FPreviewForm is used in the producer (report ancestor) in the ppProd.pas
function TppProducer.CreatePreviewForm: TppCustomPreviewer.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com