Close-Button in Panel (TppPreviewPlugIn)
Hello,
I use the TppPreviewPlugIn to display the preview in a TPanel. Unfortunately, a close button is displayed in the toolbar. How can I configure this button so that it is only displayed for canceling while printing, but is otherwise hidden? I don't need its function to close because it interferes with the program flow.
Thank you and happy weekend!
I use the TppPreviewPlugIn to display the preview in a TPanel. Unfortunately, a close button is displayed in the toolbar. How can I configure this button so that it is only displayed for canceling while printing, but is otherwise hidden? I don't need its function to close because it interferes with the program flow.
Thank you and happy weekend!
Comments
First take a look at the TppPreview.PrintStateChangeEvent for how the cancel button is manipulated in the standard Preview. You will need to override, copy, and alter this code to hide the button rather than change the caption when the viewer is no busy.
Next take a look at the TppPreview.ToolButtonClickEvent and TppCustomPreview.PerformPreviewAction for what happens when the button is clicked. Hiding the button after the viewer is done should make altering these unnecessary but it is good to know how it functions.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I overwritten and registered the class locally and it works perfectly.
Thank you so much!