Cancel / Close button management
We embedded a print preview plugin inside one of our own forms that is
itself embedded inside a "forms manager" framework, and the forms
manager has its on UI for closing its hosted forms.
So I want to be able to hide the button on the print preview plugin
AFTER its changed from a Cancel button to a Close button (pretty sure it
has that dual functionality). However, I can't find the right event to
do this. I've played with TppPreivew.EventNotify, but it doesn't
give me what I need. Any ideas?
TIA Paul
itself embedded inside a "forms manager" framework, and the forms
manager has its on UI for closing its hosted forms.
So I want to be able to hide the button on the print preview plugin
AFTER its changed from a Cancel button to a Close button (pretty sure it
has that dual functionality). However, I can't find the right event to
do this. I've played with TppPreivew.EventNotify, but it doesn't
give me what I need. Any ideas?
TIA Paul
This discussion has been closed.
Comments
The built-in previewer uses the PrintStateChangeEvent routine to control
the Cancel/Close button. In your own preview plugin, you could override
this routine and tailor it to your needs.
From the viewer, you should be able to use the OnEndGenerate event to
manipulate anything after the report has finished generating.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
procedure TnxPreviewPlugin.PrintStateChangeEvent(Sender: TObject);
begin
inherited;
if not viewer.Busy then
CancelButton.visible := False;
end;